// (c) 2009 Experian.com - Author: Brian Kueck http://www.briankueck.com

$(document).ready(function(){try{jQuery.dynamicBackgroundBoxesIsAnimating=false;$('.showContent').hide();$('.noMarker').contents('.icon').css('backgroundPosition','0px 0px');if(!jQuery.dynamicBackgroundBoxesMaxWidth){jQuery.dynamicBackgroundBoxesMaxWidth='440px';}
if(!jQuery.dynamicBackgroundBoxesMinWidth){jQuery.dynamicBackgroundBoxesMinWidth='440px';}
if(!jQuery.noSpotlights){jQuery.noSpotlights=false;}
$('.dynamicLearnMore').click(function(e){var evtClick=(e&&e.detail)?e.detail:window.event;if((evtClick==1)||(evtClick.button==0)){toggleBox($(this),'toggle','toggle',0);}});$('.noMarker').contents('.icon').click(function(e){var evtClick=(e&&e.detail)?e.detail:window.event;if((evtClick==1)||(evtClick.button==0)){toggleBox($(this),'toggle','toggle',0);}});$('.dynamicClose').click(function(e){var evtClick=(e&&e.detail)?e.detail:window.event;if((evtClick==1)||(evtClick.button==0)){toggleBox($(this),'toggle','toggle',1);}});$('div.expandAll').click(function(){toggleAllBoxes('expandAll');});$('div.collapseAll').click(function(){toggleAllBoxes('collapseAll');});}catch(e){}finally{}});function toggleBox(objTag,strAction,strSpeed,strIconClicked){try{objTag=objTag.parents('.noMarker');if((jQuery.dynamicBackgroundBoxesIsAnimating==false)||(strAction=='expandAll')||(strAction=='collapseAll')){var strOpen='|none|expand|expandAll|';var strClose='|block|collapse|collapseAll|';var strBypassIsAnimating='|expandAll|collapseAll|';if(strBypassIsAnimating.indexOf('|'+strAction+'|')==-1){jQuery.dynamicBackgroundBoxesIsAnimating=true;}
strAction=(strAction=='toggle')?objTag.contents('.showContent').css('display'):strAction;if(strSpeed=='toggle'){strSpeed=(strClose.indexOf('|'+strAction+'|')>-1)?'normal':(strOpen.indexOf('|'+strAction+'|')>-1)?'slow':strSpeed;}
switch(strAction){case'none':case'expand':case'expandAll':objTag.contents('.icon').css('backgroundPosition','-5px 0px');switch(strSpeed){case'fastest':objTag.contents('.showContent').css('display','block');break;default:objTag.contents('.showContent').slideDown(strSpeed,resizeAllBoxes);if(navigator.userAgent.indexOf('MSIE 6.0')>-1){objTag.contents('.rightBorder').css('margin-top','-10px');}
break;}
break;case'block':case'collapse':case'collapseAll':objTag.contents('.icon').css('backgroundPosition','0px 0px');switch(strSpeed){case'fastest':objTag.contents('.showContent').css('display','none');break;default:resizeAllBoxes('close',objTag,strIconClicked);objTag.contents('.showContent').slideUp(strSpeed,cancelIsAnimating);break;}
break;}}}catch(e){}finally{}}
function resizeAllBoxes(strAction,objTag,strIconClicked){try{var intAnimatedDivs=0;var intLastOpenBoxTopCoords=0;var objSpotlightBottomSliver=$('.spotlightBottom').offset();if(objSpotlightBottomSliver){var arrayFAQs=$('.noMarker');for(var i=0,j=arrayFAQs.length;i<j;i++){if($(arrayFAQs[i]).contents('.showContent').css('display')==='block'){intLastOpenBoxTopCoords=$(arrayFAQs[i]).offset().top;switch(strAction){case'close':if($(arrayFAQs[i]).prev().contents('.showContent').offset().top>objSpotlightBottomSliver.top){$(arrayFAQs[i]).contents('.showContent').css('width',jQuery.dynamicBackgroundBoxesMaxWidth);}else if(objTag.offset().top>=objSpotlightBottomSliver.top){}else if($(arrayFAQs[i]).contents('.showContent').offset().top<=objSpotlightBottomSliver.top){$(arrayFAQs[i]).contents('.showContent').animate({width:jQuery.dynamicBackgroundBoxesMinWidth},'normal');}else if((intAnimatedDivs==0)&&(intLastOpenBoxTopCoords>=objSpotlightBottomSliver.top)){$(arrayFAQs[i]).contents('.showContent').animate({width:jQuery.dynamicBackgroundBoxesMinWidth},'normal');intAnimatedDivs++;}
break;default:if($(arrayFAQs[i]).offset().top>objSpotlightBottomSliver.top){$(arrayFAQs[i]).contents('.showContent').animate({width:jQuery.dynamicBackgroundBoxesMaxWidth},'fast');}else{$(arrayFAQs[i]).contents('.showContent').css('width',jQuery.dynamicBackgroundBoxesMinWidth);}
break;}}else{if(jQuery.noSpotlights&&$(arrayFAQs[i]).offset().top>objSpotlightBottomSliver.top){$(arrayFAQs[i]).contents('.showContent').css('width',jQuery.dynamicBackgroundBoxesMaxWidth);}else{$(arrayFAQs[i]).contents('.showContent').css('width',jQuery.dynamicBackgroundBoxesMinWidth);}}}
if(strAction!='close'){cancelIsAnimating();}}}catch(e){}finally{}}
function cancelIsAnimating(){try{jQuery.dynamicBackgroundBoxesIsAnimating=false;}catch(e){}finally{}}
function toggleAllBoxes(strAction){try{var objArray=$('.dynamicLearnMore');for(var i=0,j=objArray.length;i<j;i++){toggleBox($(objArray[i]),strAction,'fastest',i);}}catch(e){}finally{}}