$(function(){$("#container-1 > ul").tabs({selected:0})});$(function(){$("#cta-large").cycle({fx:"fade",speed:1000,timeout:5000,pager:"#pager"});$("#testimonials").cycle({fx:"fade",speed:1000,timeout:5000,pager:"#pager2"});$("#eventbutton").mouseover(function(){$("#news").hide();$("#events").show();$("#eventbutton").css("background","transparent url(/wp-content/themes/biocare-medical/images/currently-events-biocare-medical.png) -175px 0px");$("#newsbutton").css("background","transparent url(/wp-content/themes/biocare-medical/images/currently-events-biocare-medical.png) 0px -40px")});$("#newsbutton").mouseover(function(){$("#events").hide();$("#news").show();$("#eventbutton").css("background","transparent url(/wp-content/themes/biocare-medical/images/currently-events-biocare-medical.png) -175px -40px");$("#newsbutton").css("background","transparent url(/wp-content/themes/biocare-medical/images/currently-events-biocare-medical.png) 0px 0px")});$("#s").focus(function(){if($(this).val()=="Search"){$(this).val("")}$("#search").css("background","transparent url(/wp-content/themes/biocare-medical/images/search-biocare-medical.png) 0px -20px")});$("#s").blur(function(){if($(this).val()==""){$(this).val("Search")}$("#search").css("background","transparent url(/wp-content/themes/biocare-medical/images/search-biocare-medical.png) 0px 0px")});$(".searchimage").mouseover(function(){$("#search").css("background","transparent url(/wp-content/themes/biocare-medical/images/search-biocare-medical.png) 0px -20px")});$(".searchimage").mouseout(function(){$("#search").css("background","transparent url(/wp-content/themes/biocare-medical/images/search-biocare-medical.png) 0px 0px")})});$(document).ready(function(){function megaHoverOver(){$(this).find(".sub").stop().fadeTo("fast",1).show();(function($){jQuery.fn.calcSubWidth=function(){rowWidth=0;$(this).find("ul").each(function(){rowWidth+=$(this).width()})}})(jQuery);if($(this).find(".row").length>0){var biggestRow=0;$(this).find(".row").each(function(){$(this).calcSubWidth();if(rowWidth>biggestRow){biggestRow=rowWidth}});$(this).find(".sub").css({width:biggestRow});$(this).find(".row:last").css({margin:"0"})}else{$(this).calcSubWidth();$(this).find(".sub").css({width:rowWidth})}}function megaHoverOut(){$(this).find(".sub").stop().fadeTo("fast",0,function(){$(this).hide()})}var config={sensitivity:5,interval:100,over:megaHoverOver,timeout:100,out:megaHoverOut};$("ul#topnav li .sub").css({opacity:"0"});$("ul#topnav li").hoverIntent(config);$("#printMe").click(function(){window.print();return false});function resizeText(multiplier){if(document.getElementById("subpage-content-container").style.fontSize==""){document.getElementById("subpage-content-container").style.fontSize="1.0px"}document.getElementById("subpage-content-container").style.fontSize=parseFloat(document.getElementById("subpage-content-container").style.fontSize)+(multiplier*0.2)+"em"}$("#plustext").click(function(){resizeText(1);return false});$("#minustext").click(function(){resizeText(-1);return false})});$(document).ready(function(){$(".subpage-lvl1 a.droptitle").click(function(){$(this).next("div").toggle().siblings("div:visible").hide();$(this).toggleClass("active");$(this).siblings("a").removeClass("active");return false});$("#subpage-content-container").mouseover(function(){$("div .dropdown:visible").hide();$(".subpage-lvl1 a.droptitle").removeClass("active")})});jQuery.fn.extend({haccordion:function(params){var jQ=jQuery;var params=jQ.extend({speed:0,headerclass:"header",contentclass:"content",contentwidth:658},params);return this.each(function(){jQ("."+params.headerclass,this).mouseover(function(){var p=jQ(this).parent()[0];if(p.opened!="undefined"){jQ(p.opened).next("div."+params.contentclass).animate({width:"0px"},params.speed)}p.opened=this;jQ(this).next("div."+params.contentclass).animate({width:params.contentwidth+"px"},params.speed)})})}});function ImageFlow(){this.defaults={animationSpeed:50,aspectRatio:2,buttons:false,captions:true,circular:true,imageCursor:"hand",ImageFlowID:"imageflow",imageFocusM:1,imageFocusMax:4,imagePath:"",imageScaling:true,imagesHeight:0.5,imagesM:1,onClick:function(){document.location=this.url},opacity:false,opacityArray:[10,8,6,4,2],percentLandscape:118,percentOther:100,preloadImages:true,reflections:false,reflectionGET:"",reflectionP:0.5,reflectionPNG:false,reflectPath:"",scrollbarP:0.6,slider:true,sliderCursor:"e-resize",sliderWidth:14,slideshow:false,slideshowSpeed:1500,slideshowAutoplay:false,startID:1,glideToStartID:true,startAnimation:false,xStep:150};var my=this;this.init=function(options){for(var name in my.defaults){this[name]=(options!==undefined&&options[name]!==undefined)?options[name]:my.defaults[name]}var ImageFlowDiv=document.getElementById(my.ImageFlowID);if(ImageFlowDiv){ImageFlowDiv.style.visibility="visible";this.ImageFlowDiv=ImageFlowDiv;if(this.createStructure()){this.imagesDiv=document.getElementById(my.ImageFlowID+"_images");this.captionDiv=document.getElementById(my.ImageFlowID+"_caption");this.navigationDiv=document.getElementById(my.ImageFlowID+"_navigation");this.scrollbarDiv=document.getElementById(my.ImageFlowID+"_scrollbar");this.sliderDiv=document.getElementById(my.ImageFlowID+"_slider");this.buttonNextDiv=document.getElementById(my.ImageFlowID+"_next");this.buttonPreviousDiv=document.getElementById(my.ImageFlowID+"_previous");this.buttonSlideshow=document.getElementById(my.ImageFlowID+"_slideshow");this.indexArray=[];this.current=0;this.imageID=0;this.target=0;this.memTarget=0;this.firstRefresh=true;this.firstCheck=true;this.busy=false;var width=this.ImageFlowDiv.offsetWidth;var height=Math.round(width/my.aspectRatio);document.getElementById(my.ImageFlowID+"_loading_txt").style.paddingTop=((height*0.26)+22)+"px";ImageFlowDiv.style.height=height+"px";this.loadingProgress()}}};this.createStructure=function(){var imagesDiv=my.Helper.createDocumentElement("div","images");var node,version,src,imageNode;var max=my.ImageFlowDiv.childNodes.length;for(var index=0;index<max;index++){node=my.ImageFlowDiv.childNodes[index];if(node&&node.nodeType==1&&node.nodeName=="IMG"){if(my.reflections===true){version=(my.reflectionPNG)?"3":"2";src=my.imagePath+node.getAttribute("src",2);src=my.reflectPath+"reflect"+version+".php?img="+src+my.reflectionGET;node.setAttribute("src",src)}imageNode=node.cloneNode(true);imagesDiv.appendChild(imageNode)}}if(my.circular){var first=my.Helper.createDocumentElement("div","images");var last=my.Helper.createDocumentElement("div","images");max=imagesDiv.childNodes.length;if(max<my.imageFocusMax){my.imageFocusMax=max}if(max>1){var i;for(i=0;i<max;i++){node=imagesDiv.childNodes[i];if(i<my.imageFocusMax){imageNode=node.cloneNode(true);first.appendChild(imageNode)}if(max-i<my.imageFocusMax+1){imageNode=node.cloneNode(true);last.appendChild(imageNode)}}for(i=0;i<max;i++){node=imagesDiv.childNodes[i];imageNode=node.cloneNode(true);last.appendChild(imageNode)}for(i=0;i<my.imageFocusMax;i++){node=first.childNodes[i];imageNode=node.cloneNode(true);last.appendChild(imageNode)}imagesDiv=last}}if(my.slideshow){var slideshowButton=my.Helper.createDocumentElement("div","slideshow");imagesDiv.appendChild(slideshowButton)}var loadingP=my.Helper.createDocumentElement("p","loading_txt");var loadingText=document.createTextNode(" ");loadingP.appendChild(loadingText);var loadingDiv=my.Helper.createDocumentElement("div","loading");var loadingBarDiv=my.Helper.createDocumentElement("div","loading_bar");loadingDiv.appendChild(loadingBarDiv);var captionDiv=my.Helper.createDocumentElement("div","caption");var scrollbarDiv=my.Helper.createDocumentElement("div","scrollbar");var sliderDiv=my.Helper.createDocumentElement("div","slider");scrollbarDiv.appendChild(sliderDiv);if(my.buttons){var buttonPreviousDiv=my.Helper.createDocumentElement("div","previous","button");var buttonNextDiv=my.Helper.createDocumentElement("div","next","button");scrollbarDiv.appendChild(buttonPreviousDiv);scrollbarDiv.appendChild(buttonNextDiv)}var navigationDiv=my.Helper.createDocumentElement("div","navigation");navigationDiv.appendChild(captionDiv);navigationDiv.appendChild(scrollbarDiv);var success=false;if(my.ImageFlowDiv.appendChild(imagesDiv)&&my.ImageFlowDiv.appendChild(loadingP)&&my.ImageFlowDiv.appendChild(loadingDiv)&&my.ImageFlowDiv.appendChild(navigationDiv)){max=my.ImageFlowDiv.childNodes.length;for(index=0;index<max;index++){node=my.ImageFlowDiv.childNodes[index];if(node&&node.nodeType==1&&node.nodeName=="IMG"){my.ImageFlowDiv.removeChild(node)}}success=true}return success};this.loadingProgress=function(){var p=my.loadingStatus();if((p<100||my.firstCheck)&&my.preloadImages){if(my.firstCheck&&p==100){my.firstCheck=false;window.setTimeout(my.loadingProgress,100)}else{window.setTimeout(my.loadingProgress,40)}}else{document.getElementById(my.ImageFlowID+"_loading_txt").style.display="none";document.getElementById(my.ImageFlowID+"_loading").style.display="none";window.setTimeout(my.Helper.addResizeEvent,1000);my.refresh();if(my.max>1){my.MouseWheel.init();my.MouseDrag.init();my.Touch.init();my.Key.init();if(my.slideshow){my.Slideshow.init()}if(my.slider){my.scrollbarDiv.style.visibility="visible"}}}};this.loadingStatus=function(){var max=my.imagesDiv.childNodes.length;var i=0,completed=0;var image=null;for(var index=0;index<max;index++){image=my.imagesDiv.childNodes[index];if(image&&image.nodeType==1&&image.nodeName=="IMG"){if(image.complete){completed++}i++}}var finished=Math.round((completed/i)*100);var loadingBar=document.getElementById(my.ImageFlowID+"_loading_bar");loadingBar.style.width=finished+"%";if(my.circular){i=i-(my.imageFocusMax*2);completed=(finished<1)?0:Math.round((i/100)*finished)}var loadingP=document.getElementById(my.ImageFlowID+"_loading_txt");var loadingTxt=document.createTextNode("Loading Image Library "+completed+"/"+i);loadingP.replaceChild(loadingTxt,loadingP.firstChild);return finished};this.refresh=function(){this.imagesDivWidth=my.imagesDiv.offsetWidth+my.imagesDiv.offsetLeft;this.maxHeight=Math.round(my.imagesDivWidth/my.aspectRatio);this.maxFocus=my.imageFocusMax*my.xStep;this.size=my.imagesDivWidth*0.5;this.sliderWidth=my.sliderWidth*0.5;this.scrollbarWidth=(my.imagesDivWidth-(Math.round(my.sliderWidth)*2))*my.scrollbarP;this.imagesDivHeight=Math.round(my.maxHeight*my.imagesHeight);my.ImageFlowDiv.style.height=350+"px";my.imagesDiv.style.height=my.imagesDivHeight+"px";my.navigationDiv.style.height="100px";my.captionDiv.style.width=my.imagesDivWidth+"px";my.captionDiv.style.paddingTop=Math.round(my.imagesDivWidth*0.01)+"px";my.scrollbarDiv.style.width=my.scrollbarWidth+"px";my.scrollbarDiv.style.marginTop=Math.round(my.imagesDivWidth*0.03)+"px";my.scrollbarDiv.style.marginLeft=Math.round(my.sliderWidth+((my.imagesDivWidth-my.scrollbarWidth)/2))+"px";my.scrollbarDiv.style.height="16px";my.sliderDiv.style.cursor=my.sliderCursor;my.sliderDiv.onmousedown=function(){my.MouseDrag.start(this);return false};if(my.buttons){my.buttonPreviousDiv.onclick=function(){my.MouseWheel.handle(1)};my.buttonNextDiv.onclick=function(){my.MouseWheel.handle(-1)}}var multi=(my.reflections===true)?my.reflectionP+1:1;var max=my.imagesDiv.childNodes.length;var i=0;var image=null;for(var index=0;index<max;index++){image=my.imagesDiv.childNodes[index];if(image!==null&&image.nodeType==1&&image.nodeName=="IMG"){this.indexArray[i]=index;image.url=image.getAttribute("longdesc");image.xPosition=(-i*my.xStep);image.i=i;if(my.firstRefresh){if(image.getAttribute("width")!==null&&image.getAttribute("height")!==null){image.w=image.getAttribute("width");image.h=image.getAttribute("height")*multi}else{image.w=image.width;image.h=image.height}}if((image.w)>(image.h/(my.reflectionP+1))){image.pc=my.percentLandscape;image.pcMem=my.percentLandscape}else{image.pc=my.percentOther;image.pcMem=my.percentOther}if(my.imageScaling===false){image.style.position="relative";image.style.display="inline"}image.style.cursor=my.imageCursor;i++}}this.max=my.indexArray.length;if(my.imageScaling===false){image=my.imagesDiv.childNodes[my.indexArray[0]];this.totalImagesWidth=image.w*my.max;image.style.paddingLeft=(my.imagesDivWidth/2)+(image.w/2)+"px";my.imagesDiv.style.height=image.h+"px";my.navigationDiv.style.height=(my.maxHeight-image.h)+"px"}if(my.firstRefresh){my.firstRefresh=false;my.imageID=my.startID-1;if(my.imageID<0){my.imageID=0}if(my.circular){my.imageID=my.imageID+my.imageFocusMax}maxId=(my.circular)?(my.max-(my.imageFocusMax))-1:my.max-1;if(my.imageID>maxId){my.imageID=maxId}if(my.glideToStartID===false){my.moveTo(-my.imageID*my.xStep)}if(my.startAnimation){my.moveTo(5000)}}if(my.max>1){my.glideTo(my.imageID)}my.moveTo(my.current)};this.moveTo=function(x){this.current=x;this.zIndex=my.max;for(var index=0;index<my.max;index++){var image=my.imagesDiv.childNodes[my.indexArray[index]];var currentImage=index*-my.xStep;if(my.imageScaling){if((currentImage+my.maxFocus)<my.memTarget||(currentImage-my.maxFocus)>my.memTarget){image.style.visibility="hidden";image.style.display="none"}else{var z=(Math.sqrt(10000+x*x)+100)*my.imagesM;var xs=x/z*my.size+my.size;image.style.display="block";var newImageH=(image.h/image.w*image.pc)/z*my.size;var newImageW=0;switch(newImageH>my.maxHeight){case false:newImageW=image.pc/z*my.size;break;default:newImageH=my.maxHeight;newImageW=image.w*newImageH/image.h;break}var newImageTop=(my.imagesDivHeight-newImageH)+((newImageH/(my.reflectionP+1))*my.reflectionP);image.style.left=xs-(image.pc/2)/z*my.size+"px";if(newImageW&&newImageH){image.style.height=newImageH+"px";image.style.width=newImageW+"px";image.style.top=newImageTop+"px"}image.style.visibility="visible";switch(x<0){case true:this.zIndex++;break;default:this.zIndex=my.zIndex-1;break}switch(image.i==my.imageID){case false:image.onclick=function(){my.glideTo(this.i)};break;default:this.zIndex=my.zIndex+1;if(image.url!==""){image.onclick=my.onClick}break}image.style.zIndex=my.zIndex}}else{if((currentImage+my.maxFocus)<my.memTarget||(currentImage-my.maxFocus)>my.memTarget){image.style.visibility="hidden"}else{image.style.visibility="visible";switch(image.i==my.imageID){case false:image.onclick=function(){my.glideTo(this.i)};break;default:if(image.url!==""){image.onclick=my.onClick}break}}my.imagesDiv.style.marginLeft=(x-my.totalImagesWidth)+"px"}x+=my.xStep}};this.glideTo=function(imageID){var jumpTarget,clonedImageID;if(my.circular){if(imageID+1===my.imageFocusMax){clonedImageID=my.max-my.imageFocusMax;jumpTarget=-clonedImageID*my.xStep;imageID=clonedImageID-1}if(imageID===(my.max-my.imageFocusMax)){clonedImageID=my.imageFocusMax-1;jumpTarget=-clonedImageID*my.xStep;imageID=clonedImageID+1}}var x=-imageID*my.xStep;this.target=x;this.memTarget=x;this.imageID=imageID;var caption=my.imagesDiv.childNodes[imageID].getAttribute("alt");if(caption===""||my.captions===false){caption="&nbsp;"}my.captionDiv.innerHTML=caption;if(my.MouseDrag.busy===false){if(my.circular){this.newSliderX=((imageID-my.imageFocusMax)*my.scrollbarWidth)/(my.max-(my.imageFocusMax*2)-1)-my.MouseDrag.newX}else{this.newSliderX=(imageID*my.scrollbarWidth)/(my.max-1)-my.MouseDrag.newX}my.sliderDiv.style.marginLeft=(my.newSliderX-my.sliderWidth)+"px"}if(my.opacity===true||my.imageFocusM!==my.defaults.imageFocusM){my.Helper.setOpacity(my.imagesDiv.childNodes[imageID],my.opacityArray[0]);my.imagesDiv.childNodes[imageID].pc=my.imagesDiv.childNodes[imageID].pc*my.imageFocusM;var opacityValue=0;var rightID=0;var leftID=0;var last=my.opacityArray.length;for(var i=1;i<(my.imageFocusMax+1);i++){if((i+1)>last){opacityValue=my.opacityArray[last-1]}else{opacityValue=my.opacityArray[i]}rightID=imageID+i;leftID=imageID-i;if(rightID<my.max){my.Helper.setOpacity(my.imagesDiv.childNodes[rightID],opacityValue);my.imagesDiv.childNodes[rightID].pc=my.imagesDiv.childNodes[rightID].pcMem}if(leftID>=0){my.Helper.setOpacity(my.imagesDiv.childNodes[leftID],opacityValue);my.imagesDiv.childNodes[leftID].pc=my.imagesDiv.childNodes[leftID].pcMem}}}if(jumpTarget){my.moveTo(jumpTarget)}if(my.busy===false){my.busy=true;my.animate()}};this.animate=function(){switch(my.target<my.current-1||my.target>my.current+1){case true:my.moveTo(my.current+(my.target-my.current)/3);window.setTimeout(my.animate,my.animationSpeed);my.busy=true;break;default:my.busy=false;break}};this.glideOnEvent=function(imageID){if(my.slideshow){my.Slideshow.interrupt()}my.glideTo(imageID)};this.Slideshow={direction:1,init:function(){(my.slideshowAutoplay)?my.Slideshow.start():my.Slideshow.stop()},interrupt:function(){my.Helper.removeEvent(my.ImageFlowDiv,"click",my.Slideshow.interrupt);my.Slideshow.stop()},addInterruptEvent:function(){my.Helper.addEvent(my.ImageFlowDiv,"click",my.Slideshow.interrupt)},start:function(){my.Helper.setClassName(my.buttonSlideshow,"slideshow pause");my.buttonSlideshow.onclick=function(){my.Slideshow.stop()};my.Slideshow.action=window.setInterval(my.Slideshow.slide,my.slideshowSpeed);window.setTimeout(my.Slideshow.addInterruptEvent,100)},stop:function(){my.Helper.setClassName(my.buttonSlideshow,"slideshow play");my.buttonSlideshow.onclick=function(){my.Slideshow.start()};window.clearInterval(my.Slideshow.action)},slide:function(){var newImageID=my.imageID+my.Slideshow.direction;var reverseDirection=false;if(newImageID===my.max){my.Slideshow.direction=-1;reverseDirection=true}if(newImageID<0){my.Slideshow.direction=1;reverseDirection=true}(reverseDirection)?my.Slideshow.slide():my.glideTo(newImageID)}};this.MouseWheel={init:function(){if(window.addEventListener){my.ImageFlowDiv.addEventListener("DOMMouseScroll",my.MouseWheel.get,false)}my.Helper.addEvent(my.ImageFlowDiv,"mousewheel",my.MouseWheel.get)},get:function(event){var delta=0;if(!event){event=window.event}if(event.wheelDelta){delta=event.wheelDelta/120}else{if(event.detail){delta=-event.detail/3}}if(delta){my.MouseWheel.handle(delta)}my.Helper.suppressBrowserDefault(event)},handle:function(delta){var change=false;var newImageID=0;if(delta>0){if(my.imageID>=1){newImageID=my.imageID-1;change=true}}else{if(my.imageID<(my.max-1)){newImageID=my.imageID+1;change=true}}if(change){my.glideOnEvent(newImageID)}}};this.MouseDrag={object:null,objectX:0,mouseX:0,newX:0,busy:false,init:function(){my.Helper.addEvent(my.ImageFlowDiv,"mousemove",my.MouseDrag.drag);my.Helper.addEvent(my.ImageFlowDiv,"mouseup",my.MouseDrag.stop);my.Helper.addEvent(document,"mouseup",my.MouseDrag.stop);my.ImageFlowDiv.onselectstart=function(){var selection=true;if(my.MouseDrag.busy){selection=false}return selection}},start:function(o){my.MouseDrag.object=o;my.MouseDrag.objectX=my.MouseDrag.mouseX-o.offsetLeft+my.newSliderX},stop:function(){my.MouseDrag.object=null;my.MouseDrag.busy=false},drag:function(e){var posx=0;if(!e){e=window.event}if(e.pageX){posx=e.pageX}else{if(e.clientX){posx=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft}}my.MouseDrag.mouseX=posx;if(my.MouseDrag.object!==null){var newX=(my.MouseDrag.mouseX-my.MouseDrag.objectX)+my.sliderWidth;if(newX<(-my.newSliderX)){newX=-my.newSliderX}if(newX>(my.scrollbarWidth-my.newSliderX)){newX=my.scrollbarWidth-my.newSliderX}var step,imageID;if(my.circular){step=(newX+my.newSliderX)/(my.scrollbarWidth/(my.max-(my.imageFocusMax*2)-1));imageID=Math.round(step)+my.imageFocusMax}else{step=(newX+my.newSliderX)/(my.scrollbarWidth/(my.max-1));imageID=Math.round(step)}my.MouseDrag.newX=newX;my.MouseDrag.object.style.left=newX+"px";if(my.imageID!==imageID){my.glideOnEvent(imageID)}my.MouseDrag.busy=true}}};this.Touch={x:0,startX:0,stopX:0,busy:false,first:true,init:function(){my.Helper.addEvent(my.navigationDiv,"touchstart",my.Touch.start);my.Helper.addEvent(document,"touchmove",my.Touch.handle);my.Helper.addEvent(document,"touchend",my.Touch.stop)},isOnNavigationDiv:function(e){var state=false;if(e.touches){var target=e.touches[0].target;if(target===my.navigationDiv||target===my.sliderDiv||target===my.scrollbarDiv){state=true}}return state},getX:function(e){var x=0;if(e.touches){x=e.touches[0].pageX}return x},start:function(e){my.Touch.startX=my.Touch.getX(e);my.Touch.busy=true;my.Helper.suppressBrowserDefault(e)},isBusy:function(){var busy=false;if(my.Touch.busy){busy=true}return busy},handle:function(e){if(my.Touch.isBusy&&my.Touch.isOnNavigationDiv(e)){var max=(my.circular)?(my.max-(my.imageFocusMax*2)-1):(my.max-1);if(my.Touch.first){my.Touch.stopX=(max-my.imageID)*(my.imagesDivWidth/max);my.Touch.first=false}var newX=-(my.Touch.getX(e)-my.Touch.startX-my.Touch.stopX);if(newX<0){newX=0}if(newX>my.imagesDivWidth){newX=my.imagesDivWidth}my.Touch.x=newX;var imageID=Math.round(newX/(my.imagesDivWidth/max));imageID=max-imageID;if(my.imageID!==imageID){if(my.circular){imageID=imageID+my.imageFocusMax}my.glideOnEvent(imageID)}my.Helper.suppressBrowserDefault(e)}},stop:function(){my.Touch.stopX=my.Touch.x;my.Touch.busy=false}};this.Key={init:function(){document.onkeydown=function(event){my.Key.handle(event)}},handle:function(event){var charCode=my.Key.get(event);switch(charCode){case 39:my.MouseWheel.handle(-1);break;case 37:my.MouseWheel.handle(1);break}},get:function(event){event=event||window.event;return event.keyCode}};this.Helper={addEvent:function(obj,type,fn){if(obj.addEventListener){obj.addEventListener(type,fn,false)}else{if(obj.attachEvent){obj["e"+type+fn]=fn;obj[type+fn]=function(){obj["e"+type+fn](window.event)};obj.attachEvent("on"+type,obj[type+fn])}}},removeEvent:function(obj,type,fn){if(obj.removeEventListener){obj.removeEventListener(type,fn,false)}else{if(obj.detachEvent){if(obj[type+fn]===undefined){alert("Helper.removeEvent » Pointer to detach event is undefined - perhaps you are trying to detach an unattached event?")}obj.detachEvent("on"+type,obj[type+fn]);obj[type+fn]=null;obj["e"+type+fn]=null}}},setOpacity:function(object,value){if(my.opacity===true){object.style.opacity=value/10;object.style.filter="alpha(opacity="+value*10+")"}},createDocumentElement:function(type,id,optionalClass){var element=document.createElement(type);element.setAttribute("id",my.ImageFlowID+"_"+id);if(optionalClass!==undefined){id+=" "+optionalClass}my.Helper.setClassName(element,id);return element},setClassName:function(element,className){if(element){element.setAttribute("class",className);element.setAttribute("className",className)}},suppressBrowserDefault:function(e){if(e.preventDefault){e.preventDefault()}else{e.returnValue=false}return false},addResizeEvent:function(){var otherFunctions=window.onresize;if(typeof window.onresize!="function"){window.onresize=function(){my.refresh()}}else{window.onresize=function(){if(otherFunctions){otherFunctions()}my.refresh()}}}}}var domReadyEvent={name:"domReadyEvent",events:{},domReadyID:1,bDone:false,DOMContentLoadedCustom:null,add:function(handler){if(!handler.$$domReadyID){handler.$$domReadyID=this.domReadyID++;if(this.bDone){handler()}this.events[handler.$$domReadyID]=handler}},remove:function(handler){if(handler.$$domReadyID){delete this.events[handler.$$domReadyID]}},run:function(){if(this.bDone){return}this.bDone=true;for(var i in this.events){this.events[i]()}},schedule:function(){if(this.bDone){return}if(/KHTML|WebKit/i.test(navigator.userAgent)){if(/loaded|complete/.test(document.readyState)){this.run()}else{setTimeout(this.name+".schedule()",100)}}else{if(document.getElementById("__ie_onload")){return true}}if(typeof this.DOMContentLoadedCustom==="function"){if(typeof document.getElementsByTagName!=="undefined"&&(document.getElementsByTagName("body")[0]!==null||document.body!==null)){if(this.DOMContentLoadedCustom()){this.run()}else{setTimeout(this.name+".schedule()",250)}}}return true},init:function(){if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){domReadyEvent.run()},false)}setTimeout("domReadyEvent.schedule()",100);function run(){domReadyEvent.run()}if(typeof addEvent!=="undefined"){addEvent(window,"load",run)}else{if(document.addEventListener){document.addEventListener("load",run,false)}else{if(typeof window.onload==="function"){var oldonload=window.onload;window.onload=function(){domReadyEvent.run();oldonload()}}else{window.onload=run}}}
/*@cc_on
			@if (@_win32 || @_win64)
			document.write("<script id=__ie_onload defer src=\"//:\"><\/script>");
			var script = document.getElementById("__ie_onload");
			script.onreadystatechange = function()
			{
				if (this.readyState == "complete")
				{
					domReadyEvent.run(); // call the onload handler
				}
			};
			@end
		@*/
}};var domReady=function(handler){domReadyEvent.add(handler)};domReadyEvent.init();domReady(function(){var instanceOne=new ImageFlow();instanceOne.init({ImageFlowID:"myImageFlow"})});(function($){var ver="2.26";var ie6=$.browser.msie&&/MSIE 6.0/.test(navigator.userAgent);function log(){if(window.console&&window.console.log){window.console.log("[cycle] "+Array.prototype.join.call(arguments,""))}}$.fn.cycle=function(options){return this.each(function(){if(options===undefined||options===null){options={}}if(options.constructor==String){switch(options){case"stop":if(this.cycleTimeout){clearTimeout(this.cycleTimeout)}this.cycleTimeout=0;$(this).data("cycle.opts","");return;case"pause":this.cyclePause=1;return;case"resume":this.cyclePause=0;return;default:options={fx:options}}}else{if(options.constructor==Number){var num=options;options=$(this).data("cycle.opts");if(!options){log("options not found, can not advance slide");return}if(num<0||num>=options.elements.length){log("invalid slide index: "+num);return}options.nextSlide=num;if(this.cycleTimeout){clearTimeout(this.cycleTimeout);this.cycleTimeout=0}go(options.elements,options,1,num>=options.currSlide);return}}if(this.cycleTimeout){clearTimeout(this.cycleTimeout)}this.cycleTimeout=0;this.cyclePause=0;var $cont=$(this);var $slides=options.slideExpr?$(options.slideExpr,this):$cont.children();var els=$slides.get();if(els.length<2){log("terminating; too few slides: "+els.length);return}var opts=$.extend({},$.fn.cycle.defaults,options||{},$.metadata?$cont.metadata():$.meta?$cont.data():{});if(opts.autostop){opts.countdown=opts.autostopCount||els.length}$cont.data("cycle.opts",opts);opts.container=this;opts.elements=els;opts.before=opts.before?[opts.before]:[];opts.after=opts.after?[opts.after]:[];opts.after.unshift(function(){opts.busy=0});if(opts.continuous){opts.after.push(function(){go(els,opts,0,!opts.rev)})}if(ie6&&opts.cleartype&&!opts.cleartypeNoBg){clearTypeFix($slides)}var cls=this.className;opts.width=parseInt((cls.match(/w:(\d+)/)||[])[1])||opts.width;opts.height=parseInt((cls.match(/h:(\d+)/)||[])[1])||opts.height;opts.timeout=parseInt((cls.match(/t:(\d+)/)||[])[1])||opts.timeout;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.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}}var first=opts.startingSlide||0;$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();if($.browser.msie){els[first].style.removeAttribute("filter")}if(opts.fit&&opts.width){$slides.width(opts.width)}if(opts.fit&&opts.height&&opts.height!="auto"){$slides.height(opts.height)}if(opts.pause){$cont.hover(function(){this.cyclePause=1},function(){this.cyclePause=0})}var init=$.fn.cycle.transitions[opts.fx];if($.isFunction(init)){init($cont,$slides,opts)}else{if(opts.fx!="custom"){log("unknown transition: "+opts.fx)}}$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()});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){if(opts.speed.constructor==String){opts.speed={slow:600,fast:200}[opts.speed]||400}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=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}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.click&&!opts.next){opts.next=opts.click}if(opts.next){$(opts.next).bind("click",function(){return advance(els,opts,opts.rev?-1:1)})}if(opts.prev){$(opts.prev).bind("click",function(){return advance(els,opts,opts.rev?1:-1)})}if(opts.pager){buildPager(els,opts)}opts.addSlide=function(newSlide){var $s=$(newSlide),s=$s[0];if(!opts.autostopCount){opts.countdown++}els.push(s);if(opts.els){opts.els.push(s)}opts.slideCount=els.length;$s.css("position","absolute").appendTo($cont);if(ie6&&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(typeof opts.onAddSlide=="function"){opts.onAddSlide($s)}};if(opts.timeout||opts.continuous){this.cycleTimeout=setTimeout(function(){go(els,opts,0,!opts.rev)},opts.continuous?10:opts.timeout+(opts.delay||0))}})};function go(els,opts,manual,fwd){if(opts.busy){return}var p=opts.container,curr=els[opts.currSlide],next=els[opts.nextSlide];if(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){if(opts.before.length){$.each(opts.before,function(i,o){o.apply(next,[curr,next,opts,fwd])})}var after=function(){if($.browser.msie&&opts.cleartype){this.style.removeAttribute("filter")}$.each(opts.after,function(i,o){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)}}}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)}}if(opts.timeout&&!opts.continuous){p.cycleTimeout=setTimeout(function(){go(els,opts,0,!opts.rev)},opts.timeout)}else{if(opts.continuous&&p.cyclePause){p.cycleTimeout=setTimeout(function(){go(els,opts,0,!opts.rev)},10)}}}$.fn.cycle.updateActivePagerLink=function(pager,currSlide){$(pager).find("a").removeClass("activeSlide").filter("a:eq("+currSlide+")").addClass("activeSlide")};function advance(els,opts,val){var p=opts.container,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(opts.prevNextClick&&typeof opts.prevNextClick=="function"){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=(typeof opts.pagerAnchorBuilder=="function")?$(opts.pagerAnchorBuilder(i,el)):$('<a href="#">'+(i+1)+"</a>");if($a.parents("body").length==0){$a.appendTo($p)}$a.bind(opts.pagerEvent,function(){opts.nextSlide=i;var p=opts.container,timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0}if(typeof opts.pagerClick=="function"){opts.pagerClick(opts.nextSlide,els[opts.nextSlide])}go(els,opts,1,opts.currSlide<i);return false})};function clearTypeFix($slides){function hex(s){var 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.custom=function(curr,next,opts,cb,immediate){var $l=$(curr),$n=$(next);$n.css(opts.cssBefore);var speedIn=immediate?1:opts.speedIn;var speedOut=immediate?1:opts.speedOut;var easeIn=immediate?null:opts.easeIn;var easeOut=immediate?null:opts.easeOut;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.startingSlide+")").css("opacity",0);opts.before.push(function(){$(this).show()});opts.animIn={opacity:1};opts.animOut={opacity:0};opts.cssBefore={opacity:0};opts.cssAfter={display:"none"}}};$.fn.cycle.ver=function(){return ver};$.fn.cycle.defaults={fx:"fade",timeout:4000,continuous:0,speed:1000,speedIn:null,speedOut:null,next:null,prev:null,prevNextClick:null,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,pause:0,autostop:0,autostopCount:0,delay:0,slideExpr:null,cleartype:0,nowrap:0,fastOnEvent:0}})(jQuery);(function($){$.fn.cycle.transitions.scrollUp=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push(function(curr,next,opts){$(this).show();opts.cssBefore.top=next.offsetHeight;opts.animOut.top=0-curr.offsetHeight});opts.cssFirst={top:0};opts.animIn={top:0};opts.cssAfter={display:"none"}};$.fn.cycle.transitions.scrollDown=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push(function(curr,next,opts){$(this).show();opts.cssBefore.top=0-next.offsetHeight;opts.animOut.top=curr.offsetHeight});opts.cssFirst={top:0};opts.animIn={top:0};opts.cssAfter={display:"none"}};$.fn.cycle.transitions.scrollLeft=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push(function(curr,next,opts){$(this).show();opts.cssBefore.left=next.offsetWidth;opts.animOut.left=0-curr.offsetWidth});opts.cssFirst={left:0};opts.animIn={left:0}};$.fn.cycle.transitions.scrollRight=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push(function(curr,next,opts){$(this).show();opts.cssBefore.left=0-next.offsetWidth;opts.animOut.left=curr.offsetWidth});opts.cssFirst={left:0};opts.animIn={left:0}};$.fn.cycle.transitions.scrollHorz=function($cont,$slides,opts){$cont.css("overflow","hidden").width();opts.before.push(function(curr,next,opts,fwd){$(this).show();var currW=curr.offsetWidth,nextW=next.offsetWidth;opts.cssBefore=fwd?{left:nextW}:{left:-nextW};opts.animIn.left=0;opts.animOut.left=fwd?-currW:currW;$slides.not(curr).css(opts.cssBefore)});opts.cssFirst={left:0};opts.cssAfter={display:"none"}};$.fn.cycle.transitions.scrollVert=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push(function(curr,next,opts,fwd){$(this).show();var currH=curr.offsetHeight,nextH=next.offsetHeight;opts.cssBefore=fwd?{top:-nextH}:{top:nextH};opts.animIn.top=0;opts.animOut.top=fwd?currH:-currH;$slides.not(curr).css(opts.cssBefore)});opts.cssFirst={top:0};opts.cssAfter={display:"none"}};$.fn.cycle.transitions.slideX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(curr).css("zIndex",1)});opts.onAddSlide=function($s){$s.hide()};opts.cssBefore={zIndex:2};opts.animIn={width:"show"};opts.animOut={width:"hide"}};$.fn.cycle.transitions.slideY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(curr).css("zIndex",1)});opts.onAddSlide=function($s){$s.hide()};opts.cssBefore={zIndex:2};opts.animIn={height:"show"};opts.animOut={height:"hide"}};$.fn.cycle.transitions.shuffle=function($cont,$slides,opts){var w=$cont.css("overflow","visible").width();$slides.css({left:0,top:0});opts.before.push(function(){$(this).show()});opts.speed=opts.speed/2;opts.random=0;opts.shuffle=opts.shuffle||{left:-w,top:15};opts.els=[];for(var i=0;i<$slides.length;i++){opts.els.push($slides[i])}for(var i=0;i<opts.startingSlide;i++){opts.els.push(opts.els.shift())}opts.fxFn=function(curr,next,opts,cb,fwd){var $el=fwd?$(curr):$(next);$el.animate(opts.shuffle,opts.speedIn,opts.easeIn,function(){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)}}else{var z=$(curr).css("z-index");$el.css("z-index",parseInt(z)+1)}$el.animate({left:0,top:0},opts.speedOut,opts.easeOut,function(){$(fwd?this:curr).hide();if(cb){cb()}})})};opts.onAddSlide=function($s){$s.hide()}};$.fn.cycle.transitions.turnUp=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(this).show();opts.cssBefore.top=next.cycleH;opts.animIn.height=next.cycleH});opts.onAddSlide=function($s){$s.hide()};opts.cssFirst={top:0};opts.cssBefore={height:0};opts.animIn={top:0};opts.animOut={height:0};opts.cssAfter={display:"none"}};$.fn.cycle.transitions.turnDown=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(this).show();opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH});opts.onAddSlide=function($s){$s.hide()};opts.cssFirst={top:0};opts.cssBefore={top:0,height:0};opts.animOut={height:0};opts.cssAfter={display:"none"}};$.fn.cycle.transitions.turnLeft=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(this).show();opts.cssBefore.left=next.cycleW;opts.animIn.width=next.cycleW});opts.onAddSlide=function($s){$s.hide()};opts.cssBefore={width:0};opts.animIn={left:0};opts.animOut={width:0};opts.cssAfter={display:"none"}};$.fn.cycle.transitions.turnRight=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(this).show();opts.animIn.width=next.cycleW;opts.animOut.left=curr.cycleW});opts.onAddSlide=function($s){$s.hide()};opts.cssBefore={left:0,width:0};opts.animIn={left:0};opts.animOut={width:0};opts.cssAfter={display:"none"}};$.fn.cycle.transitions.zoom=function($cont,$slides,opts){opts.cssFirst={top:0,left:0};opts.cssAfter={display:"none"};opts.before.push(function(curr,next,opts){$(this).show();opts.cssBefore={width:0,height:0,top:next.cycleH/2,left:next.cycleW/2};opts.cssAfter={display:"none"};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};$(curr).css("zIndex",2);$(next).css("zIndex",1)});opts.onAddSlide=function($s){$s.hide()}};$.fn.cycle.transitions.fadeZoom=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){opts.cssBefore={width:0,height:0,opacity:1,left:next.cycleW/2,top:next.cycleH/2,zIndex:1};opts.animIn={top:0,left:0,width:next.cycleW,height:next.cycleH}});opts.animOut={opacity:0};opts.cssAfter={zIndex:0}};$.fn.cycle.transitions.blindX=function($cont,$slides,opts){var w=$cont.css("overflow","hidden").width();$slides.show();opts.before.push(function(curr,next,opts){$(curr).css("zIndex",1)});opts.cssBefore={left:w,zIndex:2};opts.cssAfter={zIndex:1};opts.animIn={left:0};opts.animOut={left:w}};$.fn.cycle.transitions.blindY=function($cont,$slides,opts){var h=$cont.css("overflow","hidden").height();$slides.show();opts.before.push(function(curr,next,opts){$(curr).css("zIndex",1)});opts.cssBefore={top:h,zIndex:2};opts.cssAfter={zIndex:1};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();$slides.show();opts.before.push(function(curr,next,opts){$(curr).css("zIndex",1)});opts.cssBefore={top:h,left:w,zIndex:2};opts.cssAfter={zIndex:1};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){opts.cssBefore={left:this.cycleW/2,width:0,zIndex:2};opts.animIn={left:0,width:this.cycleW};opts.animOut={left:0};$(curr).css("zIndex",1)});opts.onAddSlide=function($s){$s.hide().css("zIndex",1)}};$.fn.cycle.transitions.growY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){opts.cssBefore={top:this.cycleH/2,height:0,zIndex:2};opts.animIn={top:0,height:this.cycleH};opts.animOut={top:0};$(curr).css("zIndex",1)});opts.onAddSlide=function($s){$s.hide().css("zIndex",1)}};$.fn.cycle.transitions.curtainX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){opts.cssBefore={left:next.cycleW/2,width:0,zIndex:1,display:"block"};opts.animIn={left:0,width:this.cycleW};opts.animOut={left:curr.cycleW/2,width:0};$(curr).css("zIndex",2)});opts.onAddSlide=function($s){$s.hide()};opts.cssAfter={zIndex:1,display:"none"}};$.fn.cycle.transitions.curtainY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){opts.cssBefore={top:next.cycleH/2,height:0,zIndex:1,display:"block"};opts.animIn={top:0,height:this.cycleH};opts.animOut={top:curr.cycleH/2,height:0};$(curr).css("zIndex",2)});opts.onAddSlide=function($s){$s.hide()};opts.cssAfter={zIndex:1,display:"none"}};$.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){opts.cssBefore=opts.cssBefore||{};opts.cssBefore.zIndex=2;opts.cssBefore.display="block";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}}}$(curr).css("zIndex",1)});if(!opts.animIn){opts.animIn={left:0,top:0}}if(!opts.animOut){opts.animOut={left:0,top:0}}opts.cssAfter=opts.cssAfter||{};opts.cssAfter.zIndex=2;opts.cssAfter.display="none"};$.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){opts.cssBefore.display="block";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}}}$(curr).css("zIndex",2);$(next).css("zIndex",1)});opts.onAddSlide=function($s){$s.hide()};if(!opts.animIn){opts.animIn={left:0,top:0}}opts.cssBefore=opts.cssBefore||{};opts.cssBefore.top=0;opts.cssBefore.left=0;opts.cssAfter=opts.cssAfter||{};opts.cssAfter.zIndex=1;opts.cssAfter.display="none"};$.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){$(curr).css("zIndex",2);opts.cssBefore.display="block";if(!opts.animOut.left&&!opts.animOut.top){opts.animOut={left:w*2,top:-h/2,opacity:0}}else{opts.animOut.opacity=0}});opts.onAddSlide=function($s){$s.hide()};opts.cssBefore={left:0,top:0,zIndex:1,opacity:1};opts.animIn={left:0};opts.cssAfter={zIndex:2,display:"none"}};$.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 t=parseInt(h/2);var l=parseInt(w/2);clip="rect("+t+"px "+l+"px "+t+"px "+l+"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).css("zIndex",2);var $next=$(next).css({zIndex:3,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")}f()});opts.cssAfter={};opts.animIn={left:0};opts.animOut={left:0}}})(jQuery);jQuery.extend({easing:{easein:function(x,t,b,c,d){return c*(t/=d)*t+b},easeinout:function(x,t,b,c,d){if(t<d/2){return 2*c*t*t/(d*d)+b}var ts=t-d/2;return -2*c*ts*ts/(d*d)+2*c*ts/d+c/2+b},easeout:function(x,t,b,c,d){return -c*t*t/(d*d)+2*c*t/d+b},expoin:function(x,t,b,c,d){var flip=1;if(c<0){flip*=-1;c*=-1}return flip*(Math.exp(Math.log(c)/d*t))+b},expoout:function(x,t,b,c,d){var flip=1;if(c<0){flip*=-1;c*=-1}return flip*(-Math.exp(-Math.log(c)/d*(t-d))+c+1)+b},expoinout:function(x,t,b,c,d){var flip=1;if(c<0){flip*=-1;c*=-1}if(t<d/2){return flip*(Math.exp(Math.log(c/2)/(d/2)*t))+b}return flip*(-Math.exp(-2*Math.log(c/2)/d*(t-d))+c+1)+b},bouncein:function(x,t,b,c,d){return c-jQuery.easing.bounceout(x,d-t,0,c,d)+b},bounceout:function(x,t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b}else{if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+0.75)+b}else{if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+0.9375)+b}else{return c*(7.5625*(t-=(2.625/2.75))*t+0.984375)+b}}}},bounceinout:function(x,t,b,c,d){if(t<d/2){return jQuery.easing.bouncein(x,t*2,0,c,d)*0.5+b}return jQuery.easing.bounceout(x,t*2-d,0,c,d)*0.5+c*0.5+b},elasin:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0){return b}if((t/=d)==1){return b+c}if(!p){p=d*0.3}if(a<Math.abs(c)){a=c;var s=p/4}else{var s=p/(2*Math.PI)*Math.asin(c/a)}return -(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b},elasout:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0){return b}if((t/=d)==1){return b+c}if(!p){p=d*0.3}if(a<Math.abs(c)){a=c;var s=p/4}else{var s=p/(2*Math.PI)*Math.asin(c/a)}return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b},elasinout:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0){return b}if((t/=d/2)==2){return b+c}if(!p){p=d*(0.3*1.5)}if(a<Math.abs(c)){a=c;var s=p/4}else{var s=p/(2*Math.PI)*Math.asin(c/a)}if(t<1){return -0.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b}return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*0.5+c+b},backin:function(x,t,b,c,d){var s=1.70158;return c*(t/=d)*t*((s+1)*t-s)+b},backout:function(x,t,b,c,d){var s=1.70158;return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},backinout:function(x,t,b,c,d){var s=1.70158;if((t/=d/2)<1){return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b}return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b},linear:function(x,t,b,c,d){return c*t/d+b}}});(function($){$.keyCode={BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38};var _remove=$.fn.remove;var isFF2=$.browser.mozilla&&(parseFloat($.browser.version)<1.9);$.ui={version:"@VERSION",plugin:{add:function(module,option,set){var proto=$.ui[module].prototype;for(var i in set){proto.plugins[i]=proto.plugins[i]||[];proto.plugins[i].push([option,set[i]])}},call:function(instance,name,args){var set=instance.plugins[name];if(!set){return}for(var i=0;i<set.length;i++){if(instance.options[set[i][0]]){set[i][1].apply(instance.element,args)}}}},cssCache:{},css:function(name){if($.ui.cssCache[name]){return $.ui.cssCache[name]}var tmp=$('<div class="ui-gen">').addClass(name).css({position:"absolute",top:"-5000px",left:"-5000px",display:"block"}).appendTo("body");$.ui.cssCache[name]=!!((!(/auto|default/).test(tmp.css("cursor"))||(/^[1-9]/).test(tmp.css("height"))||(/^[1-9]/).test(tmp.css("width"))||!(/none/).test(tmp.css("backgroundImage"))||!(/transparent|rgba\(0, 0, 0, 0\)/).test(tmp.css("backgroundColor"))));try{$("body").get(0).removeChild(tmp.get(0))}catch(e){}return $.ui.cssCache[name]},hasScroll:function(e,a){if($(e).css("overflow")=="hidden"){return false}var scroll=(a&&a=="left")?"scrollLeft":"scrollTop",has=false;if(e[scroll]>0){return true}e[scroll]=1;has=(e[scroll]>0);e[scroll]=0;return has}};$.fn.extend({remove:function(){$("*",this).add(this).each(function(){$(this).triggerHandler("remove")});return _remove.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false})},ariaRole:function(role){return(role!==undefined?this.attr("role",isFF2?"wairole:"+role:role):(this.attr("role")||"").replace(/^wairole:/,""))},ariaState:function(state,value){return(value!==undefined?this.each(function(i,el){(isFF2?el.setAttributeNS("http://www.w3.org/2005/07/aaa","aaa:"+state,value):$(el).attr("aria-"+state,value))}):this.attr(isFF2?"aaa:"+state:"aria-"+state))}});$.extend($.expr[":"],{data:function(a,i,m){return $.data(a,m[3])},tabbable:function(a,i,m){var nodeName=a.nodeName.toLowerCase();var isVisible=function(element){function checkStyles(element){var style=element.style;return(style.display!="none"&&style.visibility!="hidden")}var visible=checkStyles(element);(visible&&$.each($.dir(element,"parentNode"),function(){return(visible=checkStyles(this))}));return visible};return(a.tabIndex>=0&&(("a"==nodeName&&a.href)||(/input|select|textarea|button/.test(nodeName)&&"hidden"!=a.type&&!a.disabled))&&isVisible(a))}});function getter(namespace,plugin,method,args){function getMethods(type){var methods=$[namespace][plugin][type]||[];return(typeof methods=="string"?methods.split(/,?\s+/):methods)}var methods=getMethods("getter");if(args.length==1&&typeof args[0]=="string"){methods=methods.concat(getMethods("getterSetter"))}return($.inArray(method,methods)!=-1)}$.widget=function(name,prototype){var namespace=name.split(".")[0];name=name.split(".")[1];$.fn[name]=function(options){var isMethodCall=(typeof options=="string"),args=Array.prototype.slice.call(arguments,1);if(isMethodCall&&options.substring(0,1)=="_"){return this}if(isMethodCall&&getter(namespace,name,options,args)){var instance=$.data(this[0],name);return(instance?instance[options].apply(instance,args):undefined)}return this.each(function(){var instance=$.data(this,name);(!instance&&!isMethodCall&&$.data(this,name,new $[namespace][name](this,options)));(instance&&isMethodCall&&$.isFunction(instance[options])&&instance[options].apply(instance,args))})};$[namespace]=$[namespace]||{};$[namespace][name]=function(element,options){var self=this;this.widgetName=name;this.widgetEventPrefix=$[namespace][name].eventPrefix||name;this.widgetBaseClass=namespace+"-"+name;this.options=$.extend({},$.widget.defaults,$[namespace][name].defaults,$.metadata&&$.metadata.get(element)[name],options);this.element=$(element).bind("setData."+name,function(e,key,value){return self._setData(key,value)}).bind("getData."+name,function(e,key){return self._getData(key)}).bind("remove",function(){return self.destroy()});this._init()};$[namespace][name].prototype=$.extend({},$.widget.prototype,prototype);$[namespace][name].getterSetter="option"};$.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName)},option:function(key,value){var options=key,self=this;if(typeof key=="string"){if(value===undefined){return this._getData(key)}options={};options[key]=value}$.each(options,function(key,value){self._setData(key,value)})},_getData:function(key){return this.options[key]},_setData:function(key,value){this.options[key]=value;if(key=="disabled"){this.element[value?"addClass":"removeClass"](this.widgetBaseClass+"-disabled")}},enable:function(){this._setData("disabled",false)},disable:function(){this._setData("disabled",true)},_trigger:function(type,e,data){var eventName=(type==this.widgetEventPrefix?type:this.widgetEventPrefix+type);e=e||$.event.fix({type:eventName,target:this.element[0]});return this.element.triggerHandler(eventName,[e,data],this.options[type])}};$.widget.defaults={disabled:false};$.ui.mouse={_mouseInit:function(){var self=this;this.element.bind("mousedown."+this.widgetName,function(e){return self._mouseDown(e)}).bind("click."+this.widgetName,function(e){if(self._preventClickEvent){self._preventClickEvent=false;return false}});if($.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);($.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))},_mouseDown:function(e){(this._mouseStarted&&this._mouseUp(e));this._mouseDownEvent=e;var self=this,btnIsLeft=(e.which==1),elIsCancel=(typeof this.options.cancel=="string"?$(e.target).parents().add(e.target).filter(this.options.cancel).length:false);if(!btnIsLeft||elIsCancel||!this._mouseCapture(e)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){self.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)){this._mouseStarted=(this._mouseStart(e)!==false);if(!this._mouseStarted){e.preventDefault();return true}}this._mouseMoveDelegate=function(e){return self._mouseMove(e)};this._mouseUpDelegate=function(e){return self._mouseUp(e)};$(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);return false},_mouseMove:function(e){if($.browser.msie&&!e.button){return this._mouseUp(e)}if(this._mouseStarted){this._mouseDrag(e);return false}if(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,e)!==false);(this._mouseStarted?this._mouseDrag(e):this._mouseUp(e))}return !this._mouseStarted},_mouseUp:function(e){$(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=true;this._mouseStop(e)}return false},_mouseDistanceMet:function(e){return(Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance)},_mouseDelayMet:function(e){return this.mouseDelayMet},_mouseStart:function(e){},_mouseDrag:function(e){},_mouseStop:function(e){},_mouseCapture:function(e){return true}};$.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);(function($){$.widget("ui.tabs",{_init:function(){this._tabify(true)},_setData:function(key,value){if((/^selected/).test(key)){this.select(value)}else{this.options[key]=value;this._tabify()}},length:function(){return this.$tabs.length},_tabId:function(a){return a.title&&a.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+$.data(a)},ui:function(tab,panel){return{options:this.options,tab:tab,panel:panel,index:this.$tabs.index(tab)}},_sanitizeSelector:function(hash){return hash.replace(/:/g,"\\:")},_cookie:function(){var cookie=this.cookie||(this.cookie="ui-tabs-"+$.data(this.element[0]));return $.cookie.apply(null,[cookie].concat($.makeArray(arguments)))},_tabify:function(init){this.$lis=$("li:has(a[href])",this.element);this.$tabs=this.$lis.map(function(){return $("a",this)[0]});this.$panels=$([]);var self=this,o=this.options;this.$tabs.each(function(i,a){if(a.hash&&a.hash.replace("#","")){self.$panels=self.$panels.add(self._sanitizeSelector(a.hash))}else{if($(a).attr("href")!="#"){$.data(a,"href.tabs",a.href);$.data(a,"load.tabs",a.href);var id=self._tabId(a);a.href="#"+id;var $panel=$("#"+id);if(!$panel.length){$panel=$(o.panelTemplate).attr("id",id).addClass(o.panelClass).insertAfter(self.$panels[i-1]||self.element);$panel.data("destroy.tabs",true)}self.$panels=self.$panels.add($panel)}else{o.disabled.push(i+1)}}});if(init){this.element.addClass(o.navClass);this.$panels.addClass(o.panelClass);if(o.selected===undefined){if(location.hash){this.$tabs.each(function(i,a){if(a.hash==location.hash){o.selected=i;return false}})}else{if(o.cookie){var index=parseInt(self._cookie(),10);if(index&&self.$tabs[index]){o.selected=index}}else{if(self.$lis.filter("."+o.selectedClass).length){o.selected=self.$lis.index(self.$lis.filter("."+o.selectedClass)[0])}}}}o.selected=o.selected===null||o.selected!==undefined?o.selected:0;o.disabled=$.unique(o.disabled.concat($.map(this.$lis.filter("."+o.disabledClass),function(n,i){return self.$lis.index(n)}))).sort();if($.inArray(o.selected,o.disabled)!=-1){o.disabled.splice($.inArray(o.selected,o.disabled),1)}this.$panels.addClass(o.hideClass);this.$lis.removeClass(o.selectedClass);if(o.selected!==null){this.$panels.eq(o.selected).removeClass(o.hideClass);var classes=[o.selectedClass];if(o.deselectable){classes.push(o.deselectableClass)}this.$lis.eq(o.selected).addClass(classes.join(" "));var onShow=function(){self._trigger("show",null,self.ui(self.$tabs[o.selected],self.$panels[o.selected]))};if($.data(this.$tabs[o.selected],"load.tabs")){this.load(o.selected,onShow)}else{onShow()}}$(window).bind("unload",function(){self.$tabs.unbind(".tabs");self.$lis=self.$tabs=self.$panels=null})}else{o.selected=this.$lis.index(this.$lis.filter("."+o.selectedClass)[0])}if(o.cookie){this._cookie(o.selected,o.cookie)}for(var i=0,li;li=this.$lis[i];i++){$(li)[$.inArray(i,o.disabled)!=-1&&!$(li).hasClass(o.selectedClass)?"addClass":"removeClass"](o.disabledClass)}if(o.cache===false){this.$tabs.removeData("cache.tabs")}var hideFx,showFx;if(o.fx){if(o.fx.constructor==Array){hideFx=o.fx[0];showFx=o.fx[1]}else{hideFx=showFx=o.fx}}function resetStyle($el,fx){$el.css({display:""});if($.browser.msie&&fx.opacity){$el[0].style.removeAttribute("filter")}}var showTab=showFx?function(clicked,$show){$show.animate(showFx,showFx.duration||"normal",function(){$show.removeClass(o.hideClass);resetStyle($show,showFx);self._trigger("show",null,self.ui(clicked,$show[0]))})}:function(clicked,$show){$show.removeClass(o.hideClass);self._trigger("show",null,self.ui(clicked,$show[0]))};var hideTab=hideFx?function(clicked,$hide,$show){$hide.animate(hideFx,hideFx.duration||"normal",function(){$hide.addClass(o.hideClass);resetStyle($hide,hideFx);if($show){showTab(clicked,$show,$hide)}})}:function(clicked,$hide,$show){$hide.addClass(o.hideClass);if($show){showTab(clicked,$show)}};function switchTab(clicked,$li,$hide,$show){var classes=[o.selectedClass];if(o.deselectable){classes.push(o.deselectableClass)}$li.addClass(classes.join(" ")).siblings().removeClass(classes.join(" "));hideTab(clicked,$hide,$show)}this.$tabs.unbind(".tabs").bind(o.event+".tabs",function(){var $li=$(this).parents("li:eq(0)"),$hide=self.$panels.filter(":visible"),$show=$(self._sanitizeSelector(this.hash));if(($li.hasClass(o.selectedClass)&&!o.deselectable)||$li.hasClass(o.disabledClass)||$(this).hasClass(o.loadingClass)||self._trigger("select",null,self.ui(this,$show[0]))===false){this.blur();return false}o.selected=self.$tabs.index(this);if(o.deselectable){if($li.hasClass(o.selectedClass)){self.options.selected=null;$li.removeClass([o.selectedClass,o.deselectableClass].join(" "));self.$panels.stop();hideTab(this,$hide);this.blur();return false}else{if(!$hide.length){self.$panels.stop();var a=this;self.load(self.$tabs.index(this),function(){$li.addClass([o.selectedClass,o.deselectableClass].join(" "));showTab(a,$show)});this.blur();return false}}}if(o.cookie){self._cookie(o.selected,o.cookie)}self.$panels.stop();if($show.length){var a=this;self.load(self.$tabs.index(this),$hide.length?function(){switchTab(a,$li,$hide,$show)}:function(){$li.addClass(o.selectedClass);showTab(a,$show)})}else{throw"jQuery UI Tabs: Mismatching fragment identifier."}if($.browser.msie){this.blur()}return false});if(o.event!="click"){this.$tabs.bind("click.tabs",function(){return false})}},add:function(url,label,index){if(index==undefined){index=this.$tabs.length}var o=this.options;var $li=$(o.tabTemplate.replace(/#\{href\}/g,url).replace(/#\{label\}/g,label));$li.data("destroy.tabs",true);var id=url.indexOf("#")==0?url.replace("#",""):this._tabId($("a:first-child",$li)[0]);var $panel=$("#"+id);if(!$panel.length){$panel=$(o.panelTemplate).attr("id",id).addClass(o.hideClass).data("destroy.tabs",true)}$panel.addClass(o.panelClass);if(index>=this.$lis.length){$li.appendTo(this.element);$panel.appendTo(this.element[0].parentNode)}else{$li.insertBefore(this.$lis[index]);$panel.insertBefore(this.$panels[index])}o.disabled=$.map(o.disabled,function(n,i){return n>=index?++n:n});this._tabify();if(this.$tabs.length==1){$li.addClass(o.selectedClass);$panel.removeClass(o.hideClass);var href=$.data(this.$tabs[0],"load.tabs");if(href){this.load(index,href)}}this._trigger("add",null,this.ui(this.$tabs[index],this.$panels[index]))},remove:function(index){var o=this.options,$li=this.$lis.eq(index).remove(),$panel=this.$panels.eq(index).remove();if($li.hasClass(o.selectedClass)&&this.$tabs.length>1){this.select(index+(index+1<this.$tabs.length?1:-1))}o.disabled=$.map($.grep(o.disabled,function(n,i){return n!=index}),function(n,i){return n>=index?--n:n});this._tabify();this._trigger("remove",null,this.ui($li.find("a")[0],$panel[0]))},enable:function(index){var o=this.options;if($.inArray(index,o.disabled)==-1){return}var $li=this.$lis.eq(index).removeClass(o.disabledClass);if($.browser.safari){$li.css("display","inline-block");setTimeout(function(){$li.css("display","block")},0)}o.disabled=$.grep(o.disabled,function(n,i){return n!=index});this._trigger("enable",null,this.ui(this.$tabs[index],this.$panels[index]))},disable:function(index){var self=this,o=this.options;if(index!=o.selected){this.$lis.eq(index).addClass(o.disabledClass);o.disabled.push(index);o.disabled.sort();this._trigger("disable",null,this.ui(this.$tabs[index],this.$panels[index]))}},select:function(index){if(typeof index=="string"){index=this.$tabs.index(this.$tabs.filter("[href$="+index+"]")[0])}this.$tabs.eq(index).trigger(this.options.event+".tabs")},load:function(index,callback){var self=this,o=this.options,$a=this.$tabs.eq(index),a=$a[0],bypassCache=callback==undefined||callback===false,url=$a.data("load.tabs");callback=callback||function(){};if(!url||!bypassCache&&$.data(a,"cache.tabs")){callback();return}var inner=function(parent){var $parent=$(parent),$inner=$parent.find("*:last");return $inner.length&&$inner.is(":not(img)")&&$inner||$parent};var cleanup=function(){self.$tabs.filter("."+o.loadingClass).removeClass(o.loadingClass).each(function(){if(o.spinner){inner(this).parent().html(inner(this).data("label.tabs"))}});self.xhr=null};if(o.spinner){var label=inner(a).html();inner(a).wrapInner("<em></em>").find("em").data("label.tabs",label).html(o.spinner)}var ajaxOptions=$.extend({},o.ajaxOptions,{url:url,success:function(r,s){$(self._sanitizeSelector(a.hash)).html(r);cleanup();if(o.cache){$.data(a,"cache.tabs",true)}self._trigger("load",null,self.ui(self.$tabs[index],self.$panels[index]));try{o.ajaxOptions.success(r,s)}catch(e){}callback()}});if(this.xhr){this.xhr.abort();cleanup()}$a.addClass(o.loadingClass);self.xhr=$.ajax(ajaxOptions)},url:function(index,url){this.$tabs.eq(index).removeData("cache.tabs").data("load.tabs",url)},destroy:function(){var o=this.options;this.element.unbind(".tabs").removeClass(o.navClass).removeData("tabs");this.$tabs.each(function(){var href=$.data(this,"href.tabs");if(href){this.href=href}var $this=$(this).unbind(".tabs");$.each(["href","load","cache"],function(i,prefix){$this.removeData(prefix+".tabs")})});this.$lis.add(this.$panels).each(function(){if($.data(this,"destroy.tabs")){$(this).remove()}else{$(this).removeClass([o.selectedClass,o.deselectableClass,o.disabledClass,o.panelClass,o.hideClass].join(" "))}});if(o.cookie){this._cookie(null,o.cookie)}}});$.extend($.ui.tabs,{version:"@VERSION",getter:"length",defaults:{deselectable:false,event:"click",disabled:[],cookie:null,spinner:"Loading&#8230;",cache:false,idPrefix:"ui-tabs-",ajaxOptions:null,fx:null,tabTemplate:'<li><a href="#{href}"><span>#{label}</span></a></li>',panelTemplate:"<div></div>",navClass:"ui-tabs-nav",selectedClass:"ui-tabs-selected",deselectableClass:"ui-tabs-deselectable",disabledClass:"ui-tabs-disabled",panelClass:"ui-tabs-panel",hideClass:"ui-tabs-hide",loadingClass:"ui-tabs-loading"}});$.extend($.ui.tabs.prototype,{rotation:null,rotate:function(ms,continuing){continuing=continuing||false;var self=this,t=this.options.selected;function start(){self.rotation=setInterval(function(){t=++t<self.$tabs.length?t:0;self.select(t)},ms)}function stop(e){if(!e||e.clientX){clearInterval(self.rotation)}}if(ms){start();if(!continuing){this.$tabs.bind(this.options.event+".tabs",stop)}else{this.$tabs.bind(this.options.event+".tabs",function(){stop();t=self.options.selected;start()})}}else{stop();this.$tabs.unbind(this.options.event+".tabs",stop)}}})})(jQuery);this.vtip=function(){this.xOffset=-15;this.yOffset=28;$(".vtip").unbind().hover(function(e){this.t=this.title;this.title="";this.top=(e.pageY+yOffset);this.left=(e.pageX+xOffset);$("body").append('<p id="vtip"><img id="vtipArrow" />'+this.t+"</p>");$("p#vtip #vtipArrow").attr("src","/wp-content/themes/biocare-medical/images/vtip_arrow.png");$("p#vtip").css("top",this.top+"px").css("left",this.left+"px").fadeIn("slow")},function(){this.title=this.t;$("p#vtip").fadeOut("slow").remove()}).mousemove(function(e){this.top=(e.pageY+yOffset);this.left=(e.pageX+xOffset);$("p#vtip").css("top",this.top+"px").css("left",this.left+"px")})};jQuery(document).ready(function($){vtip()});
