(function($){var firstvalid=true;$.fn.validationEngine=function(settings){if($.validationEngineLanguage){allRules=$.validationEngineLanguage.allRules}else{allRules={"required":{"regex":"none","alertText":"* This field is required","alertTextCheckboxMultiple":"* Please select an option","alertTextCheckboxe":"* This checkbox is required"},"church_name":{"regex":"none","alertText":"* Church Name is required "},"first_name":{"regex":"none","alertText":"* First Name is required "},"last_name":{"regex":"none","alertText":"* Last Name is required "},"phone_number":{"regex":"none","alertText":"* Phone number is required "},"email_address":{"regex":"none","alertText":"* Email address is required "},"message":{"regex":"none","alertText":"* A brief description is required "},"length":{"regex":"none","alertText":"* Between ","alertText2":" and ","alertText3":" characters allowed"},"phone_length":{"regex":"none","alertText":"* ","alertText2":" digits required "},"maxCheckbox":{"regex":"none","alertText":"* Checks allowed Exceeded"},"minCheckbox":{"regex":"none","alertText":"* Please select ","alertText2":" options"},"contact_type":{"regex":"none","alertText":"* Please select how you want ","alertText2":"    to be contacted"},"confirm":{"regex":"none","alertText":"* Your field is not matching"},"telephone":{"regex":"/^[0-9\-\(\)\ ]+$/","alertText":"* Invalid phone number"},"email":{"regex":"/^[a-zA-Z0-9_\.\-]+\@([a-zA-Z0-9\-]+\.)+[a-zA-Z0-9]{2,4}$/","alertText":"* Invalid email address"},"date":{"regex":"/^[0-9]{4}\-\[0-9]{1,2}\-\[0-9]{1,2}$/","alertText":"* Invalid date, must be in YYYY-MM-DD format"},"onlyNumber":{"regex":"/^[0-9\ ]+$/","alertText":"* Numbers only"},"noSpecialCaracters":{"regex":"/^[0-9a-zA-Z]+$/","alertText":"* No special caracters allowed"},"ajaxUser":{"file":"validateUser.php","alertTextOk":"* This user is available","alertTextLoad":"* Loading, please wait","alertText":"* This user is already taken"},"ajaxName":{"file":"validateUser.php","alertText":"* This name is already taken","alertTextOk":"* This name is available","alertTextLoad":"* Loading, please wait"},"onlyLetter":{"regex":"/^[a-zA-Z\ \']+$/","alertText":"* Letters only"},"requiredWithValueAsLabel":{"regex":"none","alertText":"* This field is required"},"firstNameAsLabel":{"regex":"none","alertText":"* First Name is required"},"lastNameAsLabel":{"regex":"none","alertText":"* Last Name is required"},"emailAsLabel":{"regex":"none","alertText":"* Email Address is required"},"phoneAsLabel":{"regex":"none","alertText":"* Phone Number is required"},"messageAsLabel":{"regex":"none","alertText":"* A brief description is required"}}}
settings=jQuery.extend({allrules:allRules,validationEventTriggers:"blur",inlineValidation:true,returnIsValid:false,ajaxSubmit:false,promptPosition:"topRight",success:false,failure:function(){}},settings);$.validationEngine.ajaxValidArray=new Array()
if(settings.inlineValidation==true){if(firstvalid==true){$(this).find("[class^=validate]").not("[type=checkbox]").bind(settings.validationEventTriggers,function(caller){_inlinEvent(this)})
$(this).find("[class^=validate][type=checkbox]").bind("click",function(caller){_inlinEvent(this)})
firstvalid=false;}
function _inlinEvent(caller){if($.validationEngine.intercept==false||!$.validationEngine.intercept){$.validationEngine.onSubmitValid=false;$.validationEngine.loadValidation(caller,settings);}else{$.validationEngine.intercept=false;}}}
if(settings.returnIsValid==true){if($.validationEngine.submitValidation(this,settings)){return false;}else{return true;}}
$(this).bind("submit",function(caller){$.validationEngine.onSubmitValid=true;if($.validationEngine.submitValidation(this,settings)==false){if($.validationEngine.submitForm(this,settings)==true){return false;}}else{settings.failure&&settings.failure();return false;}})};$.validationEngine={submitForm:function(caller){if($.validationEngine.settings.ajaxSubmit){$.ajax({type:"POST",url:$.validationEngine.settings.ajaxSubmitFile,async:true,data:$(caller).serialize(),error:function(data,transport){$.validationEngine.debug("error in the ajax: "+data.status+" "+transport)},success:function(data){if(data=="true"){$('#contactBox').css("opacity",1)
$('#contactBox').animate({opacity:0,height:0},function(){$('#contactBox').css("display","none")
$('#contactBox').before("<div class='ajaxSubmit'>"+$.validationEngine.settings.ajaxSubmitMessage+"</div>")
$.validationEngine.closePrompt(".formError",true)
$(".ajaxSubmit").show("slow")
if($.validationEngine.settings.success){$.validationEngine.settings.success&&$.validationEngine.settings.success();return false;}})}else{data=eval("("+data+")");if(!data.jsonValidateReturn){$.validationEngine.debug("you are not going into the success fonction and jsonValidateReturn return nothing")}
errorNumber=data.jsonValidateReturn.length
for(index=0;index<errorNumber;index++){fieldId=data.jsonValidateReturn[index][0];promptError=data.jsonValidateReturn[index][1];type=data.jsonValidateReturn[index][2];$.validationEngine.buildPrompt(fieldId,promptError,type);}}}})
return true;}
if($.validationEngine.settings.success){$(caller).unbind("submit")
$.validationEngine.settings.success&&$.validationEngine.settings.success();return true;}
return false;},buildPrompt:function(caller,promptText,type,ajaxed){var divFormError=document.createElement('div');var formErrorContent=document.createElement('div');linkTofield=$(caller).attr("id")+"formError";linkTofield=linkTofield.replace("[","");linkTofield=linkTofield.replace("]","");$(divFormError).addClass("formError")
if(type=="pass"){$(divFormError).addClass("greenPopup")}
if(type=="load"){$(divFormError).addClass("blackPopup")}
if(ajaxed){$(divFormError).addClass("ajaxed")}
$(divFormError).addClass(linkTofield)
$(formErrorContent).addClass("formErrorContent")
$("body").append(divFormError)
$(divFormError).append(formErrorContent)
if($.validationEngine.showTriangle!=false){var arrow=document.createElement('div')
$(arrow).addClass("formErrorArrow")
$(divFormError).append(arrow)
if($.validationEngine.settings.promptPosition=="bottomLeft"||$.validationEngine.settings.promptPosition=="bottomRight"){$(arrow).addClass("formErrorArrowBottom")
$(arrow).html('<div class="line1"><!-- --></div><div class="line2"><!-- --></div><div class="line3"><!-- --></div><div class="line4"><!-- --></div><div class="line5"><!-- --></div><div class="line6"><!-- --></div><div class="line7"><!-- --></div><div class="line8"><!-- --></div><div class="line9"><!-- --></div><div class="line10"><!-- --></div>');}
if($.validationEngine.settings.promptPosition=="topLeft"||$.validationEngine.settings.promptPosition=="topRight"){$(divFormError).append(arrow)
$(arrow).html('<div class="line10"><!-- --></div><div class="line9"><!-- --></div><div class="line8"><!-- --></div><div class="line7"><!-- --></div><div class="line6"><!-- --></div><div class="line5"><!-- --></div><div class="line4"><!-- --></div><div class="line3"><!-- --></div><div class="line2"><!-- --></div><div class="line1"><!-- --></div>');}}
$(formErrorContent).html(promptText)
callerTopPosition=$(caller).offset().top;callerleftPosition=$(caller).offset().left;callerWidth=$(caller).width()
inputHeight=$(divFormError).height()
if($.validationEngine.settings.promptPosition=="topRight"){callerleftPosition+=callerWidth-30;callerTopPosition+=-inputHeight-10;}
if($.validationEngine.settings.promptPosition=="topLeft"){callerTopPosition+=-inputHeight-10;}
if($.validationEngine.settings.promptPosition=="centerRight"){callerleftPosition+=callerWidth+13;}
if($.validationEngine.settings.promptPosition=="bottomLeft"){callerHeight=$(caller).height();callerleftPosition=callerleftPosition;callerTopPosition=callerTopPosition+callerHeight+15;}
if($.validationEngine.settings.promptPosition=="bottomRight"){callerHeight=$(caller).height();callerleftPosition+=callerWidth-30;callerTopPosition+=callerHeight+15;}
$(divFormError).css({top:callerTopPosition,left:callerleftPosition,opacity:0})
return $(divFormError).animate({"opacity":0.87},function(){return true;});},updatePromptText:function(caller,promptText,type,ajaxed){linkTofield=$(caller).attr("id")+"formError";linkTofield=linkTofield.replace("[","");linkTofield=linkTofield.replace("]","");var updateThisPrompt="."+linkTofield;if(type=="pass"){$(updateThisPrompt).addClass("greenPopup")}else{$(updateThisPrompt).removeClass("greenPopup")};if(type=="load"){$(updateThisPrompt).addClass("blackPopup")}else{$(updateThisPrompt).removeClass("blackPopup")};if(ajaxed){$(updateThisPrompt).addClass("ajaxed")}else{$(updateThisPrompt).removeClass("ajaxed")};$(updateThisPrompt).find(".formErrorContent").html(promptText)
callerTopPosition=$(caller).offset().top;inputHeight=$(updateThisPrompt).height()
if($.validationEngine.settings.promptPosition=="bottomLeft"||$.validationEngine.settings.promptPosition=="bottomRight"){callerHeight=$(caller).height()
callerTopPosition=callerTopPosition+callerHeight+15}
if($.validationEngine.settings.promptPosition=="centerRight"){callerleftPosition+=callerWidth+13;}
if($.validationEngine.settings.promptPosition=="topLeft"||$.validationEngine.settings.promptPosition=="topRight"){callerTopPosition=callerTopPosition-inputHeight-10}
$(updateThisPrompt).animate({top:callerTopPosition});},loadValidation:function(caller,settings){$.validationEngine.settings=settings
rulesParsing=$(caller).attr('class');rulesRegExp=/\[(.*)\]/;getRules=rulesRegExp.exec(rulesParsing);str=getRules[1]
pattern=/[^\sA-Za-z0-9_]+/;result=str.split(pattern);var validateCalll=$.validationEngine.validateCall(caller,result)
return validateCalll},validateCall:function(caller,rules){var promptText=""
if(!$(caller).attr("id")){$.validationEngine.debug("This field have no ID attribut( name & class displayed): "+$(caller).attr("name")+" "+$(caller).attr("class"))}
var prompt=$(caller).attr("id");var caller=caller;ajaxValidate=false
var callerName=$(caller).attr("name")
var groupCallerName=$(caller).attr("id")
$.validationEngine.isError=false;$.validationEngine.showTriangle=true
callerType=$(caller).attr("type");for(i=0;i<rules.length;i++){switch(rules[i]){case"optional":if(!$(caller).val()){$.validationEngine.closePrompt(caller)
return $.validationEngine.isError}
break;case"required":_required(caller,rules);break;case"church_name":_required(caller,rules);break;case"first_name":_required(caller,rules);break;case"last_name":_required(caller,rules);break;case"phone_number":_required(caller,rules);break;case"email_address":_required(caller,rules);break;case"message":_required(caller,rules);break;case"custom":_customRegex(caller,rules,i);break;case"ajax":if(!$.validationEngine.onSubmitValid){_ajax(caller,rules,i);}
break;case"length":_length(caller,rules,i);break;case"phone_length":_phone_length(caller,rules,i);break;case"maxCheckbox":_maxCheckbox(caller,rules,i);groupname=$(caller).attr("name");caller=$("input[name='"+groupname+"']")
break;case"minCheckbox":_minCheckbox(caller,rules,i);groupname=$(caller).attr("name");caller=$("input[name='"+groupname+"']")
break;case"contact_type":_contact_type(caller,rules,i);groupname=$(caller).attr("name");caller=$("input[name='"+groupname+"']")
break
case"confirm":_confirm(caller,rules,i);break;case"requiredWithValueAsLabel":_requiredWithValueAsLabel(caller,rules,i);break;case"firstNameAsLabel":_firstNameAsLabel(caller,rules,i);break;case"lastNameAsLabel":_lastNameAsLabel(caller,rules,i);break;case"emailAsLabel":_emailAsLabel(caller,rules,i);break;case"phoneAsLabel":_phoneAsLabel(caller,rules,i);break;case"messageAsLabel":_messageAsLabel(caller,rules,i);break;default:;};};if($.validationEngine.isError==true){radioHackOpen();($("div."+prompt+"formError").size()==0)?$.validationEngine.buildPrompt(caller,promptText,"error"):$.validationEngine.updatePromptText(caller,promptText);}else{radioHackClose();$.validationEngine.closePrompt(caller);}
function radioHackOpen(){if($("input[id='"+groupCallerName+"']").size()>1&&(callerType=="radio"||callerType=="checkbox")){caller=$("input[id='"+groupCallerName+"'][type!=hidden]:first");$.validationEngine.showTriangle=false;prompt=$(caller).attr("id");}}
function radioHackClose(){if($("input[id='"+groupCallerName+"']").size()>1&&(callerType=="radio"||callerType=="checkbox")){caller=$("input[id='"+groupCallerName+"'][type!=hidden]:first");}}
function _required(caller,rules){callerType=$(caller).attr("type");if(callerType=="text"||callerType=="password"||callerType=="textarea"){if(!$(caller).val()){$.validationEngine.isError=true;promptText+=$.validationEngine.settings.allrules[rules[i]].alertText+"<br />";}}
if(callerType=="radio"||callerType=="checkbox"){callerName=$(caller).attr("name");if($("input[name='"+callerName+"']:checked").size()==0){$.validationEngine.isError=true;if($("input[name='"+callerName+"']").size()==1){promptText+=$.validationEngine.settings.allrules[rules[i]].alertTextCheckboxe+"<br />";}else{promptText+=$.validationEngine.settings.allrules[rules[i]].alertTextCheckboxMultiple+"<br />";}}}
if(callerType=="select-one"){callerName=$(caller).attr("id");if(!$("#"+callerName).val()){$.validationEngine.isError=true;promptText+=$.validationEngine.settings.allrules[rules[i]].alertText+"<br />";}}
if(callerType=="select-multiple"){callerName=$(caller).attr("id");if(!$("#"+callerName).val()){$.validationEngine.isError=true;promptText+=$.validationEngine.settings.allrules[rules[i]].alertText+"<br />";}}}
function _customRegex(caller,rules,position){customRule=rules[position+1];pattern=eval($.validationEngine.settings.allrules[customRule].regex);if(!pattern.test($(caller).attr('value'))){$.validationEngine.isError=true;promptText+=$.validationEngine.settings.allrules[customRule].alertText+"<br />";}}
function _ajax(caller,rules,position){customAjaxRule=rules[position+1];postfile=$.validationEngine.settings.allrules[customAjaxRule].file;fieldValue=$(caller).val();ajaxCaller=caller;fieldId=$(caller).attr("id");ajaxValidate=true;ajaxisError=$.validationEngine.isError;if(!ajaxisError){$.ajax({type:"POST",url:postfile,async:true,data:"validateValue="+fieldValue+"&validateId="+fieldId+"&validateError="+customAjaxRule,beforeSend:function(){if($.validationEngine.settings.allrules[customAjaxRule].alertTextLoad){if(!$("div."+fieldId+"formError")[0]){return $.validationEngine.buildPrompt(ajaxCaller,$.validationEngine.settings.allrules[customAjaxRule].alertTextLoad,"load");}else{$.validationEngine.updatePromptText(ajaxCaller,$.validationEngine.settings.allrules[customAjaxRule].alertTextLoad,"load");}}},error:function(data,transport){$.validationEngine.debug("error in the ajax: "+data.status+" "+transport)},success:function(data){data=eval("("+data+")");ajaxisError=data.jsonValidateReturn[2];customAjaxRule=data.jsonValidateReturn[1];ajaxCaller=$("#"+data.jsonValidateReturn[0])[0];fieldId=ajaxCaller;ajaxErrorLength=$.validationEngine.ajaxValidArray.length
existInarray=false;if(ajaxisError=="false"){_checkInArray(false)
if(!existInarray){$.validationEngine.ajaxValidArray[ajaxErrorLength]=new Array(2)
$.validationEngine.ajaxValidArray[ajaxErrorLength][0]=fieldId
$.validationEngine.ajaxValidArray[ajaxErrorLength][1]=false
existInarray=false;}
$.validationEngine.ajaxValid=false;promptText+=$.validationEngine.settings.allrules[customAjaxRule].alertText+"<br />";$.validationEngine.updatePromptText(ajaxCaller,promptText,"",true);}else{_checkInArray(true)
$.validationEngine.ajaxValid=true;if($.validationEngine.settings.allrules[customAjaxRule].alertTextOk){$.validationEngine.updatePromptText(ajaxCaller,$.validationEngine.settings.allrules[customAjaxRule].alertTextOk,"pass",true);}else{ajaxValidate=false;$.validationEngine.closePrompt(ajaxCaller);}}
function _checkInArray(validate){for(x=0;x<ajaxErrorLength;x++){if($.validationEngine.ajaxValidArray[x][0]==fieldId){$.validationEngine.ajaxValidArray[x][1]=validate
existInarray=true;}}}}});}}
function _confirm(caller,rules,position){confirmField=rules[position+1];if($(caller).attr('value')!=$("#"+confirmField).attr('value')){$.validationEngine.isError=true;promptText+=$.validationEngine.settings.allrules["confirm"].alertText+"<br />";}}
function _length(caller,rules,position){startLength=eval(rules[position+1]);endLength=eval(rules[position+2]);feildLength=$(caller).attr('value').length;if(feildLength<startLength||feildLength>endLength){$.validationEngine.isError=true;promptText+=$.validationEngine.settings.allrules["length"].alertText+startLength+$.validationEngine.settings.allrules["length"].alertText2+endLength+$.validationEngine.settings.allrules["length"].alertText3+"<br />"}}
function _phone_length(caller,rules,position){startLength=eval(rules[position+1]);endLength=eval(rules[position+2]);feildLength=$(caller).attr('value').length;if(feildLength<startLength||feildLength>endLength){$.validationEngine.isError=true;promptText+=$.validationEngine.settings.allrules["phone_length"].alertText+startLength+$.validationEngine.settings.allrules["phone_length"].alertText2+"<br />"}}
function _requiredWithValueAsLabel(caller,rules,position){ValueAsLabel=rules[position+1];callerType=$(caller).attr("type");if(callerType=="text"||callerType=="textarea"){if(($(caller).val()==ValueAsLabel)||(!$(caller).val())){$.validationEngine.isError=true;promptText+=$.validationEngine.settings.allrules[rules[i]].alertText+"<br />";}}}
function _firstNameAsLabel(caller,rules,position){ValueAsLabel=rules[position+1];callerType=$(caller).attr("type");if(callerType=="text"||callerType=="textarea"){if(($(caller).val()==ValueAsLabel)||(!$(caller).val())){$.validationEngine.isError=true;promptText+=$.validationEngine.settings.allrules[rules[i]].alertText+"<br />";}}}
function _lastNameAsLabel(caller,rules,position){ValueAsLabel=rules[position+1];callerType=$(caller).attr("type");if(callerType=="text"||callerType=="textarea"){if(($(caller).val()==ValueAsLabel)||(!$(caller).val())){$.validationEngine.isError=true;promptText+=$.validationEngine.settings.allrules[rules[i]].alertText+"<br />";}}}
function _emailAsLabel(caller,rules,position){ValueAsLabel=rules[position+1];callerType=$(caller).attr("type");if(callerType=="text"||callerType=="textarea"){if(($(caller).val()==ValueAsLabel)||(!$(caller).val())){$.validationEngine.isError=true;promptText+=$.validationEngine.settings.allrules[rules[i]].alertText+"<br />";}}}
function _phoneAsLabel(caller,rules,position){ValueAsLabel=rules[position+1];callerType=$(caller).attr("type");if(callerType=="text"||callerType=="textarea"){if(($(caller).val()==ValueAsLabel)||(!$(caller).val())){$.validationEngine.isError=true;promptText+=$.validationEngine.settings.allrules[rules[i]].alertText+"<br />";}}}
function _messageAsLabel(caller,rules,position){ValueAsLabel=rules[position+1];callerType=$(caller).attr("type");if(callerType=="text"||callerType=="textarea"){if(($(caller).val()==ValueAsLabel)||(!$(caller).val())){$.validationEngine.isError=true;promptText+=$.validationEngine.settings.allrules[rules[i]].alertText+"<br />";}}}
function _maxCheckbox(caller,rules,position){nbCheck=eval(rules[position+1]);groupname=$(caller).attr("name");groupSize=$("input[name='"+groupname+"']:checked").size();if(groupSize>nbCheck){$.validationEngine.showTriangle=false
$.validationEngine.isError=true;promptText+=$.validationEngine.settings.allrules["maxCheckbox"].alertText+"<br />";}}
function _minCheckbox(caller,rules,position){nbCheck=eval(rules[position+1]);groupname=$(caller).attr("name");groupSize=$("input[name='"+groupname+"']:checked").size();if(groupSize<nbCheck){$.validationEngine.isError=true;$.validationEngine.showTriangle=false;promptText+=$.validationEngine.settings.allrules["minCheckbox"].alertText+" "+nbCheck+" "+$.validationEngine.settings.allrules["minCheckbox"].alertText2+"<br />";}}
function _contact_type(caller,rules,position){nbCheck=eval(rules[position+1]);groupname=$(caller).attr("id");groupSize=$("input[id='"+groupname+"']:checked").size();if(groupSize<nbCheck){$.validationEngine.isError=true;$.validationEngine.showTriangle=true;promptText+=$.validationEngine.settings.allrules["contact_type"].alertText+"<br />&nbsp;&nbsp;"+$.validationEngine.settings.allrules["contact_type"].alertText2+"<br />";}}
return($.validationEngine.isError)?$.validationEngine.isError:false;},closePrompt:function(caller,outside){if(outside){$(caller).fadeTo("fast",0,function(){$(caller).remove();});return false;}
if(!ajaxValidate){linkTofield=$(caller).attr("id")+"formError";linkTofield=linkTofield.replace("[","");linkTofield=linkTofield.replace("]","");closingPrompt="."+linkTofield;$(closingPrompt).fadeTo("fast",0,function(){$(closingPrompt).remove();});}},debug:function(error){if(!$("#debugMode")[0]){$("body").append("<div id='debugMode'><div class='debugError'><strong>This is a debug mode, you got a problem with your form, it will try to help you, refresh when you think you nailed down the problem</strong></div></div>")}
$(".debugError").append("<div class='debugerror'>"+error+"</div>")},submitValidation:function(caller,settings){var stopForm=false;$.validationEngine.settings=settings
$.validationEngine.ajaxValid=true
$(caller).find(".formError").remove();var toValidateSize=$(caller).find("[class^=validate]").size();$(caller).find("[class^=validate]").each(function(){callerId=$(this).attr("id")
if(!$("."+callerId+"formError").hasClass("ajaxed")){var validationPass=$.validationEngine.loadValidation(this,settings);return(validationPass)?stopForm=true:"";}});ajaxErrorLength=$.validationEngine.ajaxValidArray.length
for(x=0;x<ajaxErrorLength;x++){if($.validationEngine.ajaxValidArray[x][1]==false){$.validationEngine.ajaxValid=false}}
if(stopForm||!$.validationEngine.ajaxValid){return true;}else{return false}}}})(jQuery);(function($){var ver="2.72";if($.support==undefined){$.support={opacity:!($.browser.msie)};}function debug(s){if($.fn.cycle.debug){log(s);}}function log(){if(window.console&&window.console.log){window.console.log("[cycle] "+Array.prototype.join.call(arguments," "));}}$.fn.cycle=function(options,arg2){var o={s:this.selector,c:this.context};if(this.length===0&&options!="stop"){if(!$.isReady&&o.s){log("DOM not ready, queuing slideshow");$(function(){$(o.s,o.c).cycle(options,arg2);});return this;}log("terminating; zero elements found by selector"+($.isReady?"":" (DOM not ready)"));return this;}return this.each(function(){var opts=handleArguments(this,options,arg2);if(opts===false){return;}if(this.cycleTimeout){clearTimeout(this.cycleTimeout);}this.cycleTimeout=this.cyclePause=0;var $cont=$(this);var $slides=opts.slideExpr?$(opts.slideExpr,this):$cont.children();var els=$slides.get();if(els.length<2){log("terminating; too few slides: "+els.length);return;}var opts2=buildOptions($cont,$slides,els,opts,o);if(opts2===false){return;}var startTime=opts2.continuous?10:getTimeout(opts2.currSlide,opts2.nextSlide,opts2,!opts2.rev);if(startTime){startTime+=(opts2.delay||0);if(startTime<10){startTime=10;}debug("first timeout: "+startTime);this.cycleTimeout=setTimeout(function(){go(els,opts2,0,!opts2.rev);},startTime);}});};function handleArguments(cont,options,arg2){if(cont.cycleStop==undefined){cont.cycleStop=0;}if(options===undefined||options===null){options={};}if(options.constructor==String){switch(options){case"stop":cont.cycleStop++;if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);}cont.cycleTimeout=0;$(cont).removeData("cycle.opts");return false;case"pause":cont.cyclePause=1;return false;case"resume":cont.cyclePause=0;if(arg2===true){options=$(cont).data("cycle.opts");if(!options){log("options not found, can not resume");return false;}if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0;}go(options.elements,options,1,1);}return false;case"prev":case"next":var opts=$(cont).data("cycle.opts");if(!opts){log('options not found, "prev/next" ignored');return false;}$.fn.cycle[options](opts);return false;default:options={fx:options};}return options;}else{if(options.constructor==Number){var num=options;options=$(cont).data("cycle.opts");if(!options){log("options not found, can not advance slide");return false;}if(num<0||num>=options.elements.length){log("invalid slide index: "+num);return false;}options.nextSlide=num;if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0;}if(typeof arg2=="string"){options.oneTimeFx=arg2;}go(options.elements,options,1,num>=options.currSlide);return false;}}return options;}function removeFilter(el,opts){if(!$.support.opacity&&opts.cleartype&&el.style.filter){try{el.style.removeAttribute("filter");}catch(smother){}}}function buildOptions($cont,$slides,els,options,o){var opts=$.extend({},$.fn.cycle.defaults,options||{},$.metadata?$cont.metadata():$.meta?$cont.data():{});if(opts.autostop){opts.countdown=opts.autostopCount||els.length;}var cont=$cont[0];$cont.data("cycle.opts",opts);opts.$cont=$cont;opts.stopCount=cont.cycleStop;opts.elements=els;opts.before=opts.before?[opts.before]:[];opts.after=opts.after?[opts.after]:[];opts.after.unshift(function(){opts.busy=0;});if(!$.support.opacity&&opts.cleartype){opts.after.push(function(){removeFilter(this,opts);});}if(opts.continuous){opts.after.push(function(){go(els,opts,0,!opts.rev);});}saveOriginalOpts(opts);if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg){clearTypeFix($slides);}if($cont.css("position")=="static"){$cont.css("position","relative");}if(opts.width){$cont.width(opts.width);}if(opts.height&&opts.height!="auto"){$cont.height(opts.height);}if(opts.startingSlide){opts.startingSlide=parseInt(opts.startingSlide);}if(opts.random){opts.randomMap=[];for(var i=0;i<els.length;i++){opts.randomMap.push(i);}opts.randomMap.sort(function(a,b){return Math.random()-0.5;});opts.randomIndex=0;opts.startingSlide=opts.randomMap[0];}else{if(opts.startingSlide>=els.length){opts.startingSlide=0;}}opts.currSlide=opts.startingSlide=opts.startingSlide||0;var first=opts.startingSlide;$slides.css({position:"absolute",top:0,left:0}).hide().each(function(i){var z=first?i>=first?els.length-(i-first):first-i:els.length-i;$(this).css("z-index",z);});$(els[first]).css("opacity",1).show();removeFilter(els[first],opts);if(opts.fit&&opts.width){$slides.width(opts.width);}if(opts.fit&&opts.height&&opts.height!="auto"){$slides.height(opts.height);}var reshape=opts.containerResize&&!$cont.innerHeight();if(reshape){var maxw=0,maxh=0;for(var j=0;j<els.length;j++){var $e=$(els[j]),e=$e[0],w=$e.outerWidth(),h=$e.outerHeight();if(!w){w=e.offsetWidth;}if(!h){h=e.offsetHeight;}maxw=w>maxw?w:maxw;maxh=h>maxh?h:maxh;}if(maxw>0&&maxh>0){$cont.css({width:maxw+"px",height:maxh+"px"});}}if(opts.pause){$cont.hover(function(){this.cyclePause++;},function(){this.cyclePause--;});}if(supportMultiTransitions(opts)===false){return false;}var requeue=false;options.requeueAttempts=options.requeueAttempts||0;$slides.each(function(){var $el=$(this);this.cycleH=(opts.fit&&opts.height)?opts.height:$el.height();this.cycleW=(opts.fit&&opts.width)?opts.width:$el.width();if($el.is("img")){var loadingIE=($.browser.msie&&this.cycleW==28&&this.cycleH==30&&!this.complete);var loadingFF=($.browser.mozilla&&this.cycleW==34&&this.cycleH==19&&!this.complete);var loadingOp=($.browser.opera&&((this.cycleW==42&&this.cycleH==19)||(this.cycleW==37&&this.cycleH==17))&&!this.complete);var loadingOther=(this.cycleH==0&&this.cycleW==0&&!this.complete);if(loadingIE||loadingFF||loadingOp||loadingOther){if(o.s&&opts.requeueOnImageNotLoaded&&++options.requeueAttempts<100){log(options.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH);setTimeout(function(){$(o.s,o.c).cycle(options);},opts.requeueTimeout);requeue=true;return false;}else{log("could not determine size of image: "+this.src,this.cycleW,this.cycleH);}}}return true;});if(requeue){return false;}opts.cssBefore=opts.cssBefore||{};opts.animIn=opts.animIn||{};opts.animOut=opts.animOut||{};$slides.not(":eq("+first+")").css(opts.cssBefore);if(opts.cssFirst){$($slides[first]).css(opts.cssFirst);}if(opts.timeout){opts.timeout=parseInt(opts.timeout);if(opts.speed.constructor==String){opts.speed=$.fx.speeds[opts.speed]||parseInt(opts.speed);}if(!opts.sync){opts.speed=opts.speed/2;}while((opts.timeout-opts.speed)<250){opts.timeout+=opts.speed;}}if(opts.easing){opts.easeIn=opts.easeOut=opts.easing;}if(!opts.speedIn){opts.speedIn=opts.speed;}if(!opts.speedOut){opts.speedOut=opts.speed;}opts.slideCount=els.length;opts.currSlide=opts.lastSlide=first;if(opts.random){opts.nextSlide=opts.currSlide;if(++opts.randomIndex==els.length){opts.randomIndex=0;}opts.nextSlide=opts.randomMap[opts.randomIndex];}else{opts.nextSlide=opts.startingSlide>=(els.length-1)?0:opts.startingSlide+1;}if(!opts.multiFx){var init=$.fn.cycle.transitions[opts.fx];if($.isFunction(init)){init($cont,$slides,opts);}else{if(opts.fx!="custom"&&!opts.multiFx){log("unknown transition: "+opts.fx,"; slideshow terminating");return false;}}}var e0=$slides[first];if(opts.before.length){opts.before[0].apply(e0,[e0,e0,opts,true]);}if(opts.after.length>1){opts.after[1].apply(e0,[e0,e0,opts,true]);}if(opts.next){$(opts.next).bind(opts.prevNextEvent,function(){return advance(opts,opts.rev?-1:1);});}if(opts.prev){$(opts.prev).bind(opts.prevNextEvent,function(){return advance(opts,opts.rev?1:-1);});}if(opts.pager){buildPager(els,opts);}exposeAddSlide(opts,els);return opts;}function saveOriginalOpts(opts){opts.original={before:[],after:[]};opts.original.cssBefore=$.extend({},opts.cssBefore);opts.original.cssAfter=$.extend({},opts.cssAfter);opts.original.animIn=$.extend({},opts.animIn);opts.original.animOut=$.extend({},opts.animOut);$.each(opts.before,function(){opts.original.before.push(this);});$.each(opts.after,function(){opts.original.after.push(this);});}function supportMultiTransitions(opts){var i,tx,txs=$.fn.cycle.transitions;if(opts.fx.indexOf(",")>0){opts.multiFx=true;opts.fxs=opts.fx.replace(/\s*/g,"").split(",");for(i=0;i<opts.fxs.length;i++){var fx=opts.fxs[i];tx=txs[fx];if(!tx||!txs.hasOwnProperty(fx)||!$.isFunction(tx)){log("discarding unknown transition: ",fx);opts.fxs.splice(i,1);i--;}}if(!opts.fxs.length){log("No valid transitions named; slideshow terminating.");return false;}}else{if(opts.fx=="all"){opts.multiFx=true;opts.fxs=[];for(p in txs){tx=txs[p];if(txs.hasOwnProperty(p)&&$.isFunction(tx)){opts.fxs.push(p);}}}}if(opts.multiFx&&opts.randomizeEffects){var r1=Math.floor(Math.random()*20)+30;for(i=0;i<r1;i++){var r2=Math.floor(Math.random()*opts.fxs.length);opts.fxs.push(opts.fxs.splice(r2,1)[0]);}debug("randomized fx sequence: ",opts.fxs);}return true;}function exposeAddSlide(opts,els){opts.addSlide=function(newSlide,prepend){var $s=$(newSlide),s=$s[0];if(!opts.autostopCount){opts.countdown++;}els[prepend?"unshift":"push"](s);if(opts.els){opts.els[prepend?"unshift":"push"](s);}opts.slideCount=els.length;$s.css("position","absolute");$s[prepend?"prependTo":"appendTo"](opts.$cont);if(prepend){opts.currSlide++;opts.nextSlide++;}if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg){clearTypeFix($s);}if(opts.fit&&opts.width){$s.width(opts.width);}if(opts.fit&&opts.height&&opts.height!="auto"){$slides.height(opts.height);}s.cycleH=(opts.fit&&opts.height)?opts.height:$s.height();s.cycleW=(opts.fit&&opts.width)?opts.width:$s.width();$s.css(opts.cssBefore);if(opts.pager){$.fn.cycle.createPagerAnchor(els.length-1,s,$(opts.pager),els,opts);}if($.isFunction(opts.onAddSlide)){opts.onAddSlide($s);}else{$s.hide();}};}$.fn.cycle.resetState=function(opts,fx){fx=fx||opts.fx;opts.before=[];opts.after=[];opts.cssBefore=$.extend({},opts.original.cssBefore);opts.cssAfter=$.extend({},opts.original.cssAfter);opts.animIn=$.extend({},opts.original.animIn);opts.animOut=$.extend({},opts.original.animOut);opts.fxFn=null;$.each(opts.original.before,function(){opts.before.push(this);});$.each(opts.original.after,function(){opts.after.push(this);});var init=$.fn.cycle.transitions[fx];if($.isFunction(init)){init(opts.$cont,$(opts.elements),opts);}};function go(els,opts,manual,fwd){if(manual&&opts.busy&&opts.manualTrump){$(els).stop(true,true);opts.busy=false;}if(opts.busy){return;}var p=opts.$cont[0],curr=els[opts.currSlide],next=els[opts.nextSlide];if(p.cycleStop!=opts.stopCount||p.cycleTimeout===0&&!manual){return;}if(!manual&&!p.cyclePause&&((opts.autostop&&(--opts.countdown<=0))||(opts.nowrap&&!opts.random&&opts.nextSlide<opts.currSlide))){if(opts.end){opts.end(opts);}return;}if(manual||!p.cyclePause){var fx=opts.fx;curr.cycleH=curr.cycleH||$(curr).height();curr.cycleW=curr.cycleW||$(curr).width();next.cycleH=next.cycleH||$(next).height();next.cycleW=next.cycleW||$(next).width();if(opts.multiFx){if(opts.lastFx==undefined||++opts.lastFx>=opts.fxs.length){opts.lastFx=0;}fx=opts.fxs[opts.lastFx];opts.currFx=fx;}if(opts.oneTimeFx){fx=opts.oneTimeFx;opts.oneTimeFx=null;}$.fn.cycle.resetState(opts,fx);if(opts.before.length){$.each(opts.before,function(i,o){if(p.cycleStop!=opts.stopCount){return;}o.apply(next,[curr,next,opts,fwd]);});}var after=function(){$.each(opts.after,function(i,o){if(p.cycleStop!=opts.stopCount){return;}o.apply(next,[curr,next,opts,fwd]);});};if(opts.nextSlide!=opts.currSlide){opts.busy=1;if(opts.fxFn){opts.fxFn(curr,next,opts,after,fwd);}else{if($.isFunction($.fn.cycle[opts.fx])){$.fn.cycle[opts.fx](curr,next,opts,after);}else{$.fn.cycle.custom(curr,next,opts,after,manual&&opts.fastOnEvent);}}}opts.lastSlide=opts.currSlide;if(opts.random){opts.currSlide=opts.nextSlide;if(++opts.randomIndex==els.length){opts.randomIndex=0;}opts.nextSlide=opts.randomMap[opts.randomIndex];}else{var roll=(opts.nextSlide+1)==els.length;opts.nextSlide=roll?0:opts.nextSlide+1;opts.currSlide=roll?els.length-1:opts.nextSlide-1;}if(opts.pager){$.fn.cycle.updateActivePagerLink(opts.pager,opts.currSlide);}}var ms=0;if(opts.timeout&&!opts.continuous){ms=getTimeout(curr,next,opts,fwd);}else{if(opts.continuous&&p.cyclePause){ms=10;}}if(ms>0){p.cycleTimeout=setTimeout(function(){go(els,opts,0,!opts.rev);},ms);}}$.fn.cycle.updateActivePagerLink=function(pager,currSlide){$(pager).find("a").removeClass("activeSlide").filter("a:eq("+currSlide+")").addClass("activeSlide");};function getTimeout(curr,next,opts,fwd){if(opts.timeoutFn){var t=opts.timeoutFn(curr,next,opts,fwd);while((t-opts.speed)<250){t+=opts.speed;}debug("calculated timeout: "+t+"; speed: "+opts.speed);if(t!==false){return t;}}return opts.timeout;}$.fn.cycle.next=function(opts){advance(opts,opts.rev?-1:1);};$.fn.cycle.prev=function(opts){advance(opts,opts.rev?1:-1);};function advance(opts,val){var els=opts.elements;var p=opts.$cont[0],timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0;}if(opts.random&&val<0){opts.randomIndex--;if(--opts.randomIndex==-2){opts.randomIndex=els.length-2;}else{if(opts.randomIndex==-1){opts.randomIndex=els.length-1;}}opts.nextSlide=opts.randomMap[opts.randomIndex];}else{if(opts.random){if(++opts.randomIndex==els.length){opts.randomIndex=0;}opts.nextSlide=opts.randomMap[opts.randomIndex];}else{opts.nextSlide=opts.currSlide+val;if(opts.nextSlide<0){if(opts.nowrap){return false;}opts.nextSlide=els.length-1;}else{if(opts.nextSlide>=els.length){if(opts.nowrap){return false;}opts.nextSlide=0;}}}}if($.isFunction(opts.prevNextClick)){opts.prevNextClick(val>0,opts.nextSlide,els[opts.nextSlide]);}go(els,opts,1,val>=0);return false;}function buildPager(els,opts){var $p=$(opts.pager);$.each(els,function(i,o){$.fn.cycle.createPagerAnchor(i,o,$p,els,opts);});$.fn.cycle.updateActivePagerLink(opts.pager,opts.startingSlide);}$.fn.cycle.createPagerAnchor=function(i,el,$p,els,opts){var a;if($.isFunction(opts.pagerAnchorBuilder)){a=opts.pagerAnchorBuilder(i,el);}else{a='<a href="#">'+(i+1)+"</a>";}if(!a){return;}var $a=$(a);if($a.parents("body").length===0){var arr=[];if($p.length>1){$p.each(function(){var $clone=$a.clone(true);$(this).append($clone);arr.push($clone);});$a=$(arr);}else{$a.appendTo($p);}}$a.bind(opts.pagerEvent,function(e){e.preventDefault();opts.nextSlide=i;var p=opts.$cont[0],timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0;}if($.isFunction(opts.pagerClick)){opts.pagerClick(opts.nextSlide,els[opts.nextSlide]);}go(els,opts,1,opts.currSlide<i);return false;});if(opts.pagerEvent!="click"){$a.click(function(){return false;});}if(opts.pauseOnPagerHover){$a.hover(function(){opts.$cont[0].cyclePause++;},function(){opts.$cont[0].cyclePause--;});}};$.fn.cycle.hopsFromLast=function(opts,fwd){var hops,l=opts.lastSlide,c=opts.currSlide;if(fwd){hops=c>l?c-l:opts.slideCount-l;}else{hops=c<l?l-c:l+opts.slideCount-c;}return hops;};function clearTypeFix($slides){function hex(s){s=parseInt(s).toString(16);return s.length<2?"0"+s:s;}function getBg(e){for(;e&&e.nodeName.toLowerCase()!="html";e=e.parentNode){var v=$.css(e,"background-color");if(v.indexOf("rgb")>=0){var rgb=v.match(/\d+/g);return"#"+hex(rgb[0])+hex(rgb[1])+hex(rgb[2]);}if(v&&v!="transparent"){return v;}}return"#ffffff";}$slides.each(function(){$(this).css("background-color",getBg(this));});}$.fn.cycle.commonReset=function(curr,next,opts,w,h,rev){$(opts.elements).not(curr).hide();opts.cssBefore.opacity=1;opts.cssBefore.display="block";if(w!==false&&next.cycleW>0){opts.cssBefore.width=next.cycleW;}if(h!==false&&next.cycleH>0){opts.cssBefore.height=next.cycleH;}opts.cssAfter=opts.cssAfter||{};opts.cssAfter.display="none";$(curr).css("zIndex",opts.slideCount+(rev===true?1:0));$(next).css("zIndex",opts.slideCount+(rev===true?0:1));};$.fn.cycle.custom=function(curr,next,opts,cb,speedOverride){var $l=$(curr),$n=$(next);var speedIn=opts.speedIn,speedOut=opts.speedOut,easeIn=opts.easeIn,easeOut=opts.easeOut;$n.css(opts.cssBefore);if(speedOverride){if(typeof speedOverride=="number"){speedIn=speedOut=speedOverride;}else{speedIn=speedOut=1;}easeIn=easeOut=null;}var fn=function(){$n.animate(opts.animIn,speedIn,easeIn,cb);};$l.animate(opts.animOut,speedOut,easeOut,function(){if(opts.cssAfter){$l.css(opts.cssAfter);}if(!opts.sync){fn();}});if(opts.sync){fn();}};$.fn.cycle.transitions={fade:function($cont,$slides,opts){$slides.not(":eq("+opts.currSlide+")").css("opacity",0);opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.opacity=0;});opts.animIn={opacity:1};opts.animOut={opacity:0};opts.cssBefore={top:0,left:0};}};$.fn.cycle.ver=function(){return ver;};$.fn.cycle.defaults={fx:"fade",timeout:4000,timeoutFn:null,continuous:0,speed:1000,speedIn:null,speedOut:null,next:null,prev:null,prevNextClick:null,prevNextEvent:"click",pager:null,pagerClick:null,pagerEvent:"click",pagerAnchorBuilder:null,before:null,after:null,end:null,easing:null,easeIn:null,easeOut:null,shuffle:null,animIn:null,animOut:null,cssBefore:null,cssAfter:null,fxFn:null,height:"auto",startingSlide:0,sync:1,random:0,fit:0,containerResize:1,pause:0,pauseOnPagerHover:0,autostop:0,autostopCount:0,delay:0,slideExpr:null,cleartype:!$.support.opacity,cleartypeNoBg:false,nowrap:0,fastOnEvent:0,randomizeEffects:1,rev:0,manualTrump:true,requeueOnImageNotLoaded:true,requeueTimeout:250};})(jQuery);(function($){$.fn.cycle.transitions.none=function($cont,$slides,opts){opts.fxFn=function(curr,next,opts,after){$(next).show();$(curr).hide();after();};};$.fn.cycle.transitions.scrollUp=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var h=$cont.height();opts.cssBefore={top:h,left:0};opts.cssFirst={top:0};opts.animIn={top:0};opts.animOut={top:-h};};$.fn.cycle.transitions.scrollDown=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var h=$cont.height();opts.cssFirst={top:0};opts.cssBefore={top:-h,left:0};opts.animIn={top:0};opts.animOut={top:h};};$.fn.cycle.transitions.scrollLeft=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var w=$cont.width();opts.cssFirst={left:0};opts.cssBefore={left:w,top:0};opts.animIn={left:0};opts.animOut={left:0-w};};$.fn.cycle.transitions.scrollRight=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var w=$cont.width();opts.cssFirst={left:0};opts.cssBefore={left:-w,top:0};opts.animIn={left:0};opts.animOut={left:w};};$.fn.cycle.transitions.scrollHorz=function($cont,$slides,opts){$cont.css("overflow","hidden").width();opts.before.push(function(curr,next,opts,fwd){$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.left=fwd?(next.cycleW-1):(1-next.cycleW);opts.animOut.left=fwd?-curr.cycleW:curr.cycleW;});opts.cssFirst={left:0};opts.cssBefore={top:0};opts.animIn={left:0};opts.animOut={top:0};};$.fn.cycle.transitions.scrollVert=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push(function(curr,next,opts,fwd){$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.top=fwd?(1-next.cycleH):(next.cycleH-1);opts.animOut.top=fwd?curr.cycleH:-curr.cycleH;});opts.cssFirst={top:0};opts.cssBefore={left:0};opts.animIn={top:0};opts.animOut={left:0};};$.fn.cycle.transitions.slideX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(opts.elements).not(curr).hide();$.fn.cycle.commonReset(curr,next,opts,false,true);opts.animIn.width=next.cycleW;});opts.cssBefore={left:0,top:0,width:0};opts.animIn={width:"show"};opts.animOut={width:0};};$.fn.cycle.transitions.slideY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(opts.elements).not(curr).hide();$.fn.cycle.commonReset(curr,next,opts,true,false);opts.animIn.height=next.cycleH;});opts.cssBefore={left:0,top:0,height:0};opts.animIn={height:"show"};opts.animOut={height:0};};$.fn.cycle.transitions.shuffle=function($cont,$slides,opts){var i,w=$cont.css("overflow","visible").width();$slides.css({left:0,top:0});opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);});if(!opts.speedAdjusted){opts.speed=opts.speed/2;opts.speedAdjusted=true;}opts.random=0;opts.shuffle=opts.shuffle||{left:-w,top:15};opts.els=[];for(i=0;i<$slides.length;i++){opts.els.push($slides[i]);}for(i=0;i<opts.currSlide;i++){opts.els.push(opts.els.shift());}opts.fxFn=function(curr,next,opts,cb,fwd){var $el=fwd?$(curr):$(next);$(next).css(opts.cssBefore);var count=opts.slideCount;$el.animate(opts.shuffle,opts.speedIn,opts.easeIn,function(){var hops=$.fn.cycle.hopsFromLast(opts,fwd);for(var k=0;k<hops;k++){fwd?opts.els.push(opts.els.shift()):opts.els.unshift(opts.els.pop());}if(fwd){for(var i=0,len=opts.els.length;i<len;i++){$(opts.els[i]).css("z-index",len-i+count);}}else{var z=$(curr).css("z-index");$el.css("z-index",parseInt(z)+1+count);}$el.animate({left:0,top:0},opts.speedOut,opts.easeOut,function(){$(fwd?this:curr).hide();if(cb){cb();}});});};opts.cssBefore={display:"block",opacity:1,top:0,left:0};};$.fn.cycle.transitions.turnUp=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.cssBefore.top=next.cycleH;opts.animIn.height=next.cycleH;});opts.cssFirst={top:0};opts.cssBefore={left:0,height:0};opts.animIn={top:0};opts.animOut={height:0};};$.fn.cycle.transitions.turnDown=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssFirst={top:0};opts.cssBefore={left:0,top:0,height:0};opts.animOut={height:0};};$.fn.cycle.transitions.turnLeft=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.cssBefore.left=next.cycleW;opts.animIn.width=next.cycleW;});opts.cssBefore={top:0,width:0};opts.animIn={left:0};opts.animOut={width:0};};$.fn.cycle.transitions.turnRight=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.animIn.width=next.cycleW;opts.animOut.left=curr.cycleW;});opts.cssBefore={top:0,left:0,width:0};opts.animIn={left:0};opts.animOut={width:0};};$.fn.cycle.transitions.zoom=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,false,true);opts.cssBefore.top=next.cycleH/2;opts.cssBefore.left=next.cycleW/2;opts.animIn={top:0,left:0,width:next.cycleW,height:next.cycleH};opts.animOut={width:0,height:0,top:curr.cycleH/2,left:curr.cycleW/2};});opts.cssFirst={top:0,left:0};opts.cssBefore={width:0,height:0};};$.fn.cycle.transitions.fadeZoom=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,false);opts.cssBefore.left=next.cycleW/2;opts.cssBefore.top=next.cycleH/2;opts.animIn={top:0,left:0,width:next.cycleW,height:next.cycleH};});opts.cssBefore={width:0,height:0};opts.animOut={opacity:0};};$.fn.cycle.transitions.blindX=function($cont,$slides,opts){var w=$cont.css("overflow","hidden").width();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.width=next.cycleW;opts.animOut.left=curr.cycleW;});opts.cssBefore={left:w,top:0};opts.animIn={left:0};opts.animOut={left:w};};$.fn.cycle.transitions.blindY=function($cont,$slides,opts){var h=$cont.css("overflow","hidden").height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssBefore={top:h,left:0};opts.animIn={top:0};opts.animOut={top:h};};$.fn.cycle.transitions.blindZ=function($cont,$slides,opts){var h=$cont.css("overflow","hidden").height();var w=$cont.width();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssBefore={top:h,left:w};opts.animIn={top:0,left:0};opts.animOut={top:h,left:w};};$.fn.cycle.transitions.growX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.cssBefore.left=this.cycleW/2;opts.animIn={left:0,width:this.cycleW};opts.animOut={left:0};});opts.cssBefore={width:0,top:0};};$.fn.cycle.transitions.growY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.cssBefore.top=this.cycleH/2;opts.animIn={top:0,height:this.cycleH};opts.animOut={top:0};});opts.cssBefore={height:0,left:0};};$.fn.cycle.transitions.curtainX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true,true);opts.cssBefore.left=next.cycleW/2;opts.animIn={left:0,width:this.cycleW};opts.animOut={left:curr.cycleW/2,width:0};});opts.cssBefore={top:0,width:0};};$.fn.cycle.transitions.curtainY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false,true);opts.cssBefore.top=next.cycleH/2;opts.animIn={top:0,height:next.cycleH};opts.animOut={top:curr.cycleH/2,height:0};});opts.cssBefore={left:0,height:0};};$.fn.cycle.transitions.cover=function($cont,$slides,opts){var d=opts.direction||"left";var w=$cont.css("overflow","hidden").width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);if(d=="right"){opts.cssBefore.left=-w;}else{if(d=="up"){opts.cssBefore.top=h;}else{if(d=="down"){opts.cssBefore.top=-h;}else{opts.cssBefore.left=w;}}}});opts.animIn={left:0,top:0};opts.animOut={opacity:1};opts.cssBefore={top:0,left:0};};$.fn.cycle.transitions.uncover=function($cont,$slides,opts){var d=opts.direction||"left";var w=$cont.css("overflow","hidden").width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);if(d=="right"){opts.animOut.left=w;}else{if(d=="up"){opts.animOut.top=-h;}else{if(d=="down"){opts.animOut.top=h;}else{opts.animOut.left=-w;}}}});opts.animIn={left:0,top:0};opts.animOut={opacity:1};opts.cssBefore={top:0,left:0};};$.fn.cycle.transitions.toss=function($cont,$slides,opts){var w=$cont.css("overflow","visible").width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);if(!opts.animOut.left&&!opts.animOut.top){opts.animOut={left:w*2,top:-h/2,opacity:0};}else{opts.animOut.opacity=0;}});opts.cssBefore={left:0,top:0};opts.animIn={left:0};};$.fn.cycle.transitions.wipe=function($cont,$slides,opts){var w=$cont.css("overflow","hidden").width();var h=$cont.height();opts.cssBefore=opts.cssBefore||{};var clip;if(opts.clip){if(/l2r/.test(opts.clip)){clip="rect(0px 0px "+h+"px 0px)";}else{if(/r2l/.test(opts.clip)){clip="rect(0px "+w+"px "+h+"px "+w+"px)";}else{if(/t2b/.test(opts.clip)){clip="rect(0px "+w+"px 0px 0px)";}else{if(/b2t/.test(opts.clip)){clip="rect("+h+"px "+w+"px "+h+"px 0px)";}else{if(/zoom/.test(opts.clip)){var top=parseInt(h/2);var left=parseInt(w/2);clip="rect("+top+"px "+left+"px "+top+"px "+left+"px)";}}}}}}opts.cssBefore.clip=opts.cssBefore.clip||clip||"rect(0px 0px 0px 0px)";var d=opts.cssBefore.clip.match(/(\d+)/g);var t=parseInt(d[0]),r=parseInt(d[1]),b=parseInt(d[2]),l=parseInt(d[3]);opts.before.push(function(curr,next,opts){if(curr==next){return;}var $curr=$(curr),$next=$(next);$.fn.cycle.commonReset(curr,next,opts,true,true,false);opts.cssAfter.display="block";var step=1,count=parseInt((opts.speedIn/13))-1;(function f(){var tt=t?t-parseInt(step*(t/count)):0;var ll=l?l-parseInt(step*(l/count)):0;var bb=b<h?b+parseInt(step*((h-b)/count||1)):h;var rr=r<w?r+parseInt(step*((w-r)/count||1)):w;$next.css({clip:"rect("+tt+"px "+rr+"px "+bb+"px "+ll+"px)"});(step++<=count)?setTimeout(f,13):$curr.css("display","none");})();});opts.cssBefore={display:"block",opacity:1,top:0,left:0};opts.animIn={left:0};opts.animOut={left:0};};})(jQuery);jQuery.fn.jfontsizer=function(o){function setCookie(c_name,value,expiredays){var exdate=new Date();exdate.setDate(exdate.getDate()+expiredays);document.cookie=c_name+"="+escape(value)+((expiredays==null)?"":";expires="+exdate.toGMTString());}
function getCookie(c_name){if(document.cookie.length>0){c_start=document.cookie.indexOf(c_name+"=");if(c_start!=-1){c_start=c_start+c_name.length+1;c_end=document.cookie.indexOf(";",c_start);if(c_end==-1)c_end=document.cookie.length;return unescape(document.cookie.substring(c_start,c_end));}}
return"";}
var o=jQuery.extend({applyTo:'body',changesmall:'2',changelarge:'2',expire:30},o);var s='';var m='';var l='';var c=$(this).attr('rel');if(getCookie('fsizer')!=""){var c=getCookie('fsizer');switch(c){case'fs_sml':s='fsactive';$(o.applyTo).css('font-size','1em');break;case'fs_med':m='fsactive';$(o.applyTo).css('font-size','1.'+o.changelarge+'em');break;case'fs_lrg':l='fsactive';$(o.applyTo).css('font-size','1.5'+o.changelarger+'em');break;}}
else{s="fsactive";}
$(this).html('<div class="fsizer"><a id="fs_lrg" class="'+l+'">A</a><a id="fs_med" class="'+m+'">A</a><a id="fs_sml" class="'+s+'">A</a><div rel="'+c+'"></div><br style="clear: both" /></div>');$('.fsizer a').click(function(){var t=$(this).attr('id');setCookie('fsizer',t,o.expire);$('.fsizer a').removeClass('fsactive');$(this).addClass('fsactive');var f=$(o.applyTo).css('font-size');switch(t){case'fs_sml':$(o.applyTo).css('font-size','1em');break;case'fs_med':$(o.applyTo).css('font-size','1.'+o.changelarge+'em');break;case'fs_lrg':$(o.applyTo).css('font-size','1.5'+o.changelarger+'em');break;}});};;(function($){$.fn.fixPNG=function(){return this.each(function(){var image=$(this).css('backgroundImage');if(image.match(/^url\(["']?(.*\.png)["']?\)$/i)){image=RegExp.$1;$(this).css({'backgroundImage':'none','filter':"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod="+($(this).css('backgroundRepeat')=='no-repeat'?'crop':'scale')+", src='"+image+"')"}).each(function(){var position=$(this).css('position');if(position!='absolute'&&position!='relative')
$(this).css('position','relative');});}});};var elem,opts,busy=false,imagePreloader=new Image,loadingTimer,loadingFrame=1,imageRegExp=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i;var ieQuirks=null,IE6=$.browser.msie&&$.browser.version.substr(0,1)==6&&!window.XMLHttpRequest,oldIE=IE6||($.browser.msie&&$.browser.version.substr(0,1)==7);$.fn.fancybox=function(o){var settings=$.extend({},$.fn.fancybox.defaults,o);var matchedGroup=this;function _initialize(){elem=this;opts=$.extend({},settings);_start();return false;};function _start(){if(busy)return;if($.isFunction(opts.callbackOnStart)){opts.callbackOnStart();}
opts.itemArray=[];opts.itemCurrent=0;if(settings.itemArray.length>0){opts.itemArray=settings.itemArray;}else{var item={};if(!elem.rel||elem.rel==''){var item={href:elem.href,title:elem.title};if($(elem).children("img:first").length){item.orig=$(elem).children("img:first");}else{item.orig=$(elem);}
if(item.title==''||typeof item.title=='undefined'){item.title=item.orig.attr('alt');}
opts.itemArray.push(item);}else{var subGroup=$(matchedGroup).filter("a[rel="+elem.rel+"]");var item={};for(var i=0;i<subGroup.length;i++){item={href:subGroup[i].href,title:subGroup[i].title};if($(subGroup[i]).children("img:first").length){item.orig=$(subGroup[i]).children("img:first");}else{item.orig=$(subGroup[i]);}
if(item.title==''||typeof item.title=='undefined'){item.title=item.orig.attr('alt');}
opts.itemArray.push(item);}}}
while(opts.itemArray[opts.itemCurrent].href!=elem.href){opts.itemCurrent++;}
if(opts.overlayShow){if(IE6){$('embed, object, select').css('visibility','hidden');$("#fancy_overlay").css('height',$(document).height());}
$("#fancy_overlay").css({'background-color':opts.overlayColor,'opacity':opts.overlayOpacity}).show();}
$(window).bind("resize.fb scroll.fb",$.fn.fancybox.scrollBox);_change_item();};function _change_item(){$("#fancy_right, #fancy_left, #fancy_close, #fancy_title").hide();var href=opts.itemArray[opts.itemCurrent].href;if(href.match("iframe")||elem.className.indexOf("iframe")>=0){$.fn.fancybox.showLoading();_set_content('<iframe id="fancy_frame" onload="jQuery.fn.fancybox.showIframe()" name="fancy_iframe'+Math.round(Math.random()*1000)+'" frameborder="0" hspace="0" src="'+href+'"></iframe>',opts.frameWidth,opts.frameHeight);}else if(href.match(/#/)){var target=window.location.href.split('#')[0];target=href.replace(target,'');target=target.substr(target.indexOf('#'));_set_content('<div id="fancy_div">'+$(target).html()+'</div>',opts.frameWidth,opts.frameHeight);}else if(href.match(imageRegExp)){imagePreloader=new Image;imagePreloader.src=href;if(imagePreloader.complete){_proceed_image();}else{$.fn.fancybox.showLoading();$(imagePreloader).unbind().bind('load',function(){$("#fancy_loading").hide();_proceed_image();});}}else{$.fn.fancybox.showLoading();$.get(href,function(data){$("#fancy_loading").hide();_set_content('<div id="fancy_ajax">'+data+'</div>',opts.frameWidth,opts.frameHeight);});}};function _proceed_image(){var width=imagePreloader.width;var height=imagePreloader.height;var horizontal_space=(opts.padding*2)+40;var vertical_space=(opts.padding*2)+60;var w=$.fn.fancybox.getViewport();if(opts.imageScale&&(width>(w[0]-horizontal_space)||height>(w[1]-vertical_space))){var ratio=Math.min(Math.min(w[0]-horizontal_space,width)/width,Math.min(w[1]-vertical_space,height)/height);width=Math.round(ratio*width);height=Math.round(ratio*height);}
_set_content('<img alt="" id="fancy_img" src="'+imagePreloader.src+'" />',width,height);};function _preload_neighbor_images(){if((opts.itemArray.length-1)>opts.itemCurrent){var href=opts.itemArray[opts.itemCurrent+1].href||false;if(href&&href.match(imageRegExp)){objNext=new Image();objNext.src=href;}}
if(opts.itemCurrent>0){var href=opts.itemArray[opts.itemCurrent-1].href||false;if(href&&href.match(imageRegExp)){objNext=new Image();objNext.src=href;}}};function _set_content(value,width,height){busy=true;var pad=opts.padding;if(oldIE||ieQuirks){$("#fancy_content")[0].style.removeExpression("height");$("#fancy_content")[0].style.removeExpression("width");}
if(pad>0){width+=pad*2;height+=pad*2;$("#fancy_content").css({'top':pad+'px','right':pad+'px','bottom':pad+'px','left':pad+'px','width':'auto','height':'auto'});if(oldIE||ieQuirks){$("#fancy_content")[0].style.setExpression('height','(this.parentNode.clientHeight - '+pad*2+')');$("#fancy_content")[0].style.setExpression('width','(this.parentNode.clientWidth - '+pad*2+')');}}else{$("#fancy_content").css({'top':0,'right':0,'bottom':0,'left':0,'width':'100%','height':'100%'});}
if($("#fancy_outer").is(":visible")&&width==$("#fancy_outer").width()&&height==$("#fancy_outer").height()){$("#fancy_content").fadeOut('fast',function(){$("#fancy_content").empty().append($(value)).fadeIn("normal",function(){_finish();});});return;}
var w=$.fn.fancybox.getViewport();var itemTop=(height+60)>w[1]?w[3]:(w[3]+Math.round((w[1]-height-60)*0.5));var itemLeft=(width+40)>w[0]?w[2]:(w[2]+Math.round((w[0]-width-40)*0.5));var itemOpts={'left':itemLeft,'top':itemTop,'width':width+'px','height':height+'px'};if($("#fancy_outer").is(":visible")){$("#fancy_content").fadeOut("normal",function(){$("#fancy_content").empty();$("#fancy_outer").animate(itemOpts,opts.zoomSpeedChange,opts.easingChange,function(){$("#fancy_content").append($(value)).fadeIn("normal",function(){_finish();});});});}else{if(opts.zoomSpeedIn>0&&opts.itemArray[opts.itemCurrent].orig!==undefined){$("#fancy_content").empty().append($(value));var orig_item=opts.itemArray[opts.itemCurrent].orig;var orig_pos=$.fn.fancybox.getPosition(orig_item);$("#fancy_outer").css({'left':(orig_pos.left-20-opts.padding)+'px','top':(orig_pos.top-20-opts.padding)+'px','width':$(orig_item).width()+(opts.padding*2),'height':$(orig_item).height()+(opts.padding*2)});if(opts.zoomOpacity){itemOpts.opacity='show';}
$("#fancy_outer").animate(itemOpts,opts.zoomSpeedIn,opts.easingIn,function(){_finish();});}else{$("#fancy_content").hide().empty().append($(value)).show();$("#fancy_outer").css(itemOpts).fadeIn("normal",function(){_finish();});}}};function _set_navigation(){if(opts.itemCurrent!==0){$("#fancy_left, #fancy_left_ico").unbind().bind("click",function(e){e.stopPropagation();opts.itemCurrent--;_change_item();return false;});$("#fancy_left").show();}
if(opts.itemCurrent!=(opts.itemArray.length-1)){$("#fancy_right, #fancy_right_ico").unbind().bind("click",function(e){e.stopPropagation();opts.itemCurrent++;_change_item();return false;});$("#fancy_right").show();}};function _finish(){if($.browser.msie){$("#fancy_content")[0].style.removeAttribute('filter');$("#fancy_outer")[0].style.removeAttribute('filter');}
_set_navigation();_preload_neighbor_images();$(document).bind("keydown.fb",function(e){if(e.keyCode==27&&opts.enableEscapeButton){$.fn.fancybox.close();}else if(e.keyCode==37&&opts.itemCurrent!==0){$(document).unbind("keydown.fb");opts.itemCurrent--;_change_item();}else if(e.keyCode==39&&opts.itemCurrent!=(opts.itemArray.length-1)){$(document).unbind("keydown.fb");opts.itemCurrent++;_change_item();}});if(opts.hideOnContentClick){$("#fancy_content").click($.fn.fancybox.close);}
if(opts.overlayShow&&opts.hideOnOverlayClick){$("#fancy_overlay").bind("click",$.fn.fancybox.close);}
if(opts.showCloseButton){$("#fancy_close").bind("click",$.fn.fancybox.close).show();}
if(typeof opts.itemArray[opts.itemCurrent].title!=='undefined'&&opts.itemArray[opts.itemCurrent].title.length>0){var pos=$("#fancy_outer").position();$('#fancy_title div').text(opts.itemArray[opts.itemCurrent].title).html();$('#fancy_title').css({'top':pos.top+$("#fancy_outer").outerHeight()-32,'left':pos.left+(($("#fancy_outer").outerWidth()*0.5)-($('#fancy_title').width()*0.5))}).show();}
if(opts.overlayShow&&IE6){$('embed, object, select',$('#fancy_content')).css('visibility','visible');}
if($.isFunction(opts.callbackOnShow)){opts.callbackOnShow(opts.itemArray[opts.itemCurrent]);}
if($.browser.msie){$("#fancy_outer")[0].style.removeAttribute('filter');$("#fancy_content")[0].style.removeAttribute('filter');}
busy=false;};return this.unbind('click.fb').bind('click.fb',_initialize);};$.fn.fancybox.scrollBox=function(){var w=$.fn.fancybox.getViewport();if(opts.centerOnScroll&&$("#fancy_outer").is(':visible')){var ow=$("#fancy_outer").outerWidth();var oh=$("#fancy_outer").outerHeight();var pos={'top':(oh>w[1]?w[3]:w[3]+Math.round((w[1]-oh)*0.5)),'left':(ow>w[0]?w[2]:w[2]+Math.round((w[0]-ow)*0.5))};$("#fancy_outer").css(pos);$('#fancy_title').css({'top':pos.top+oh-32,'left':pos.left+((ow*0.5)-($('#fancy_title').width()*0.5))});}
if(IE6&&$("#fancy_overlay").is(':visible')){$("#fancy_overlay").css({'height':$(document).height()});}
if($("#fancy_loading").is(':visible')){$("#fancy_loading").css({'left':((w[0]-40)*0.5+w[2]),'top':((w[1]-40)*0.5+w[3])});}};$.fn.fancybox.getNumeric=function(el,prop){return parseInt($.curCSS(el.jquery?el[0]:el,prop,true))||0;};$.fn.fancybox.getPosition=function(el){var pos=el.offset();pos.top+=$.fn.fancybox.getNumeric(el,'paddingTop');pos.top+=$.fn.fancybox.getNumeric(el,'borderTopWidth');pos.left+=$.fn.fancybox.getNumeric(el,'paddingLeft');pos.left+=$.fn.fancybox.getNumeric(el,'borderLeftWidth');return pos;};$.fn.fancybox.showIframe=function(){$("#fancy_loading").hide();$("#fancy_frame").show();};$.fn.fancybox.getViewport=function(){return[$(window).width(),$(window).height(),$(document).scrollLeft(),$(document).scrollTop()];};$.fn.fancybox.animateLoading=function(){if(!$("#fancy_loading").is(':visible')){clearInterval(loadingTimer);return;}
$("#fancy_loading > div").css('top',(loadingFrame*-40)+'px');loadingFrame=(loadingFrame+1)%12;};$.fn.fancybox.showLoading=function(){clearInterval(loadingTimer);var w=$.fn.fancybox.getViewport();$("#fancy_loading").css({'left':((w[0]-40)*0.5+w[2]),'top':((w[1]-40)*0.5+w[3])}).show();$("#fancy_loading").bind('click',$.fn.fancybox.close);loadingTimer=setInterval($.fn.fancybox.animateLoading,66);};$.fn.fancybox.close=function(){busy=true;$(imagePreloader).unbind();$(document).unbind("keydown.fb");$(window).unbind("resize.fb scroll.fb");$("#fancy_overlay, #fancy_content, #fancy_close").unbind();$("#fancy_close, #fancy_loading, #fancy_left, #fancy_right, #fancy_title").hide();__cleanup=function(){if($("#fancy_overlay").is(':visible')){$("#fancy_overlay").fadeOut("fast");}
$("#fancy_content").empty();if(opts.centerOnScroll){$(window).unbind("resize.fb scroll.fb");}
if(IE6){$('embed, object, select').css('visibility','visible');}
if($.isFunction(opts.callbackOnClose)){opts.callbackOnClose();}
busy=false;};if($("#fancy_outer").is(":visible")!==false){if(opts.zoomSpeedOut>0&&opts.itemArray[opts.itemCurrent].orig!==undefined){var orig_item=opts.itemArray[opts.itemCurrent].orig;var orig_pos=$.fn.fancybox.getPosition(orig_item);var itemOpts={'left':(orig_pos.left-20-opts.padding)+'px','top':(orig_pos.top-20-opts.padding)+'px','width':$(orig_item).width()+(opts.padding*2),'height':$(orig_item).height()+(opts.padding*2)};if(opts.zoomOpacity){itemOpts.opacity='hide';}
$("#fancy_outer").stop(false,true).animate(itemOpts,opts.zoomSpeedOut,opts.easingOut,__cleanup);}else{$("#fancy_outer").stop(false,true).fadeOut('fast',__cleanup);}}else{__cleanup();}
return false;};$.fn.fancybox.build=function(){var html='';html+='<div id="fancy_overlay"></div>';html+='<div id="fancy_loading"><div></div></div>';html+='<div id="fancy_outer">';html+='<div id="fancy_inner">';html+='<div id="fancy_close"></div>';html+='<div id="fancy_bg"><div class="fancy_bg" id="fancy_bg_n"></div><div class="fancy_bg" id="fancy_bg_ne"></div><div class="fancy_bg" id="fancy_bg_e"></div><div class="fancy_bg" id="fancy_bg_se"></div><div class="fancy_bg" id="fancy_bg_s"></div><div class="fancy_bg" id="fancy_bg_sw"></div><div class="fancy_bg" id="fancy_bg_w"></div><div class="fancy_bg" id="fancy_bg_nw"></div></div>';html+='<a href="javascript:;" id="fancy_left"><span class="fancy_ico" id="fancy_left_ico"></span></a><a href="javascript:;" id="fancy_right"><span class="fancy_ico" id="fancy_right_ico"></span></a>';html+='<div id="fancy_content"></div>';html+='</div>';html+='</div>';html+='<div id="fancy_title"></div>';$(html).appendTo("body");$('<table cellspacing="0" cellpadding="0" border="0"><tr><td class="fancy_title" id="fancy_title_left"></td><td class="fancy_title" id="fancy_title_main"><div></div></td><td class="fancy_title" id="fancy_title_right"></td></tr></table>').appendTo('#fancy_title');if($.browser.msie){$(".fancy_bg").fixPNG();}
if(IE6){$("div#fancy_overlay").css("position","absolute");$("#fancy_loading div, #fancy_close, .fancy_title, .fancy_ico").fixPNG();$("#fancy_inner").prepend('<iframe id="fancy_bigIframe" src="javascript:false;" scrolling="no" frameborder="0"></iframe>');var frameDoc=$('#fancy_bigIframe')[0].contentWindow.document;frameDoc.open();frameDoc.close();}};$.fn.fancybox.defaults={padding:10,imageScale:true,zoomOpacity:true,zoomSpeedIn:0,zoomSpeedOut:0,zoomSpeedChange:300,easingIn:'swing',easingOut:'swing',easingChange:'swing',frameWidth:560,frameHeight:340,overlayShow:true,overlayOpacity:0.5,overlayColor:'#000',enableEscapeButton:true,showCloseButton:true,hideOnOverlayClick:true,hideOnContentClick:true,centerOnScroll:true,itemArray:[],callbackOnStart:null,callbackOnShow:null,callbackOnClose:null};$(document).ready(function(){ieQuirks=$.browser.msie&&!$.boxModel;if($("#fancy_outer").length<1){$.fn.fancybox.build();}});})(jQuery);jQuery.fn.labelify=function(settings){settings=jQuery.extend({text:"title",labelledClass:""},settings);var lookups={title:function(input){return $(input).attr("title");},label:function(input){return $("label[for="+input.id+"]").text();}};var lookup;var jQuery_labellified_elements=$(this);return $(this).each(function(){if(typeof settings.text==="string"){lookup=lookups[settings.text];}else{lookup=settings.text;};if(typeof lookup!=="function"){return;}
var lookupval=lookup(this);if(!lookupval){return;}
$(this).data("label",lookup(this).replace(/\n/g,''));$(this).focus(function(){if(this.value===$(this).data("label")){this.value=this.defaultValue;$(this).removeClass(settings.labelledClass);}}).blur(function(){if(this.value===this.defaultValue){this.value=$(this).data("label");$(this).addClass(settings.labelledClass);}});var removeValuesOnExit=function(){jQuery_labellified_elements.each(function(){if(this.value===$(this).data("label")){this.value=this.defaultValue;$(this).removeClass(settings.labelledClass);}})};$(this).parents("form").submit(removeValuesOnExit);$(window).unload(removeValuesOnExit);if(this.value!==this.defaultValue){return;}
this.value=$(this).data("label");$(this).addClass(settings.labelledClass);});};jQuery.fn.defuscate=function(settings){settings=jQuery.extend({link:true},settings);var regex=/\b([A-Z0-9._%-]+)\([^)]+\)((?:[A-Z0-9-]+\.)+[A-Z]{2,6})\b/gi;return this.each(function(){if($(this).is('a[@href]')){$(this).attr('href',$(this).attr('href').replace(regex,'$1@$2'));var is_link=true;}
$(this).html($(this).html().replace(regex,(settings.link&&!is_link?'<a href="mailto:$1@$2">$1@$2</a>':'$1@$2')));});}
$(document).ready(function(){$('#testimonials').cycle({cleartype:true,cleartypeNoBg:true,fx:'scrollUp',timeout:10000,speed:2000,delay:-1000,next:'#testimonials',pause:1});$(function(){$('#header-no-show img:first').css({display:'none'});$('#header-no-show img:first').fadeIn(500);});$('.slides img').css({opacity:0});setTimeout(function(){$('#header-slide-show').cycle({random:1,fx:'fade',timeout:5000,speed:2000,delay:-15000,next:'#header-slide-show',pause:1});$('.slides img').css({opacity:0});},0);$('#slideAssociations').cycle({fx:'fade',timeout:1500,speed:2000,pause:1});$('.community-slideShow').before('<ul id="nav">').cycle({fx:'fade',speed:1000,timeout:3000,next:'.community-slideShow',pause:1,pager:'#nav',pagerEvent:'mouseover',pauseOnPagerHover:true,pagerAnchorBuilder:function(idx,slide){return'<li><a href="#"><img src="'+slide.src+'" width="90"/></a></li>';}});$("a.iframe").fancybox({'hideOnContentClick':false,'frameWidth':640,'frameHeight':485});$("a.disclaimer").fancybox({'hideOnContentClick':false,'frameWidth':620,'frameHeight':375});$('a#gotop').click(function(){$('html, body').animate({scrollTop:0},'slow');return false;});$('#fontsizer').jfontsizer({applyTo:'#pa-left',changelarge:'2',changelarger:'4',expire:1});$('.address').defuscate({link:false});});function fixIEflicker(fix){try{document.execCommand("BackgroundImageCache",false,fix);}catch(err){}}
function callFailFunction(){alert("fail executed")};window.onload=function(){fixIEflicker(true);}