var wjtime = 0;
var wjotime = 0;
var checktime = 0;
var checkotime = 0;
var savetime = 0;
var saveotime = 0;
var lcctime = 0;
var lccotime = 0;
var pstime = 0;
var psotime = 0;
var rctime = 0;

function getanchorpos(){
	//function Show(){
	//window.alert("hi");
	var AnchorPos = getAnchorPosition("wj-sub-nav")
	var divTag = document.getElementById("floatingdiv")
	divTag.style.left = AnchorPos.x + 'px';	
	//divTag.style.top = AnchorPos.y + 10 + 'px';
	divTag.style.top = 149 + 'px';
	
	var AnchorPos2 = getAnchorPosition("checking-sub-nav")
	var divTag2 = document.getElementById("flchecking")
	divTag2.style.left = AnchorPos2.x + 'px';
	//divTag2.style.top = AnchorPos2.y + 10 + 'px';
	divTag2.style.top = 149 + 'px';
	
	var AnchorPos3 = getAnchorPosition("saving-sub-nav")
	var divTag3 = document.getElementById("flsaving")
	divTag3.style.left = AnchorPos3.x + 'px';
	//divTag3.style.top = AnchorPos3.y + 10 + 'px';
	divTag3.style.top = 149 + 'px';
	
	var AnchorPos2 = getAnchorPosition("lcc-sub-nav")
	var divTag2 = document.getElementById("lccnav")
	divTag2.style.left = AnchorPos2.x + 'px';
	//divTag2.style.top = AnchorPos2.y + 10 + 'px';
	divTag2.style.top = 149 + 'px';
	
	var AnchorPos = getAnchorPosition("ps-sub-nav")
	var divTag = document.getElementById("psnav")
	divTag.style.left = AnchorPos.x -182 + 'px';	
	//divTag.style.top = AnchorPos.y + 10 + 'px';
	divTag.style.top = 149 + 'px';
	
	var AnchorPos2 = getAnchorPosition("rc-sub-nav")
	var divTag2 = document.getElementById("rcnav")
	divTag2.style.left = AnchorPos2.x - 203 + 'px';
	//divTag2.style.top = AnchorPos2.y + 10 + 'px';
	divTag2.style.top = 149 + 'px';
}

function bSwap(img_name,img_src) {
	document[img_name].src=img_src;
}
function poptimer(wj_dd) {
	animatedcollapse.hide('floatingdiv')
	bSwap('wj-button','Images/Nav/mn_why_join.jpg')
}
function poptimer2(check_dd) {
	animatedcollapse.hide('flchecking')
	bSwap('check-button','Images/Nav/mn_checking.jpg')
}
function poptimer3(save_dd) {
	animatedcollapse.hide('flsaving')
	bSwap('save-button','Images/Nav/mn_savings.jpg')
}
function poptimer4(lcc_dd) {
	animatedcollapse.hide('lccnav')
	bSwap('loans-button','Images/Nav/mn_loans.jpg')
}
function poptimer5(ps_dd) {
	animatedcollapse.hide('psnav')
	bSwap('products-button','Images/Nav/mn_products.jpg')
}
function poptimer6(rc_dd) {
	animatedcollapse.hide('rcnav')
	bSwap('resource-button','Images/Nav/mn_resource.jpg')
}
/*Begin Open Timers*/
function opentimer(wj_dd) {
	animatedcollapse.show('floatingdiv')
	bSwap('wj-button','Images/Nav/mn_why_join_hover.jpg')
}
function opentimer2(check_dd) {
	animatedcollapse.show('flchecking')
	bSwap('check-button','Images/Nav/mn_checking_hover.jpg')
}
function opentimer3(save_dd) {
	animatedcollapse.show('flsaving')
	bSwap('save-button','Images/Nav/mn_savings_hover.jpg')
}
function opentimer4(lcc_dd) {
	animatedcollapse.show('lccnav')
	bSwap('loans-button','Images/Nav/mn_loans_hover.jpg')
}
function opentimer5(ps_dd) {
	animatedcollapse.show('psnav')
	bSwap('products-button','Images/Nav/mn_products_hover.jpg')
}
function opentimer6(rc_dd) {
	animatedcollapse.show('rcnav')
	bSwap('resource-button','Images/Nav/mn_resource_hover.jpg')
}

/*End Open Timers*/




animatedcollapse.addDiv('floatingdiv', 'fade=1,speed=300,height=165px')
animatedcollapse.ontoggle=function($, divobj, state){
	//fires each time a DIV is expanded/contracted
	//$: Access to jQuery
	//divobj: DOM reference to DIV being expanded/ collapsed. Use "divobj.id" to get its ID
	//state: "block" or "none", depending on state
}
animatedcollapse.addDiv('flsaving', 'fade=1,speed=250,height=120px')
animatedcollapse.ontoggle=function($, divobj, state){
	//fires each time a DIV is expanded/contracted
	//$: Access to jQuery
	//divobj: DOM reference to DIV being expanded/ collapsed. Use "divobj.id" to get its ID
	//state: "block" or "none", depending on state
}
animatedcollapse.addDiv('flchecking', 'fade=1,speed=250,height=120px')
animatedcollapse.ontoggle=function($, divobj, state){
	//fires each time a DIV is expanded/contracted
	//$: Access to jQuery
	//divobj: DOM reference to DIV being expanded/ collapsed. Use "divobj.id" to get its ID
	//state: "block" or "none", depending on state
}
animatedcollapse.addDiv('lccnav', 'fade=1,speed=250,height=140px')
animatedcollapse.ontoggle=function($, divobj, state){
	//fires each time a DIV is expanded/contracted
	//$: Access to jQuery
	//divobj: DOM reference to DIV being expanded/ collapsed. Use "divobj.id" to get its ID
	//state: "block" or "none", depending on state
}
animatedcollapse.addDiv('psnav', 'fade=1,speed=250,height=120px')
animatedcollapse.ontoggle=function($, divobj, state){
	//fires each time a DIV is expanded/contracted
	//$: Access to jQuery
	//divobj: DOM reference to DIV being expanded/ collapsed. Use "divobj.id" to get its ID
	//state: "block" or "none", depending on state
}
animatedcollapse.addDiv('rcnav', 'fade=1,speed=250,height=140px')
animatedcollapse.ontoggle=function($, divobj, state){
	//fires each time a DIV is expanded/contracted
	//$: Access to jQuery
	//divobj: DOM reference to DIV being expanded/ collapsed. Use "divobj.id" to get its ID
	//state: "block" or "none", depending on state
}
animatedcollapse.init()