/* Covered under MIT License: http://www.opensource.org/licenses/mit-license.php */
//hoverIntent
(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY;};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind("mousemove",track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev]);}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev]);};var handleHover=function(e){var p=(e.type=="mouseover"?e.fromElement:e.toElement)||e.relatedTarget;while(p&&p!=this){try{p=p.parentNode;}catch(e){p=this;}}if(p==this){return false;}var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);}if(e.type=="mouseover"){pX=ev.pageX;pY=ev.pageY;$(ob).bind("mousemove",track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}}else{$(ob).unbind("mousemove",track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob);},cfg.timeout);}}};return this.mouseover(handleHover).mouseout(handleHover);};})(jQuery);
// corner
(function(C){var A=document.createElement("div").style;var H=A.MozBorderRadius!==undefined;var J=A.WebkitBorderRadius!==undefined;var E=A.borderRadius!==undefined||A.BorderRadius!==undefined;var D=document.documentMode||0;var L=C.browser.msie&&((C.browser.version<8&&!D)||D<8);var I=C.browser.msie&&(function(){var N=document.createElement("div");try{N.style.setExpression("width","0+0");N.style.removeExpression("width")}catch(M){return false}return true})();function G(M,N){return parseInt(C.css(M,N))||0}function K(M){var M=parseInt(M).toString(16);return(M.length<2)?"0"+M:M}function B(O){while(O){var M=C.css(O,"backgroundColor");if(M&&M!="transparent"&&M!="rgba(0, 0, 0, 0)"){if(M.indexOf("rgb")>=0){var N=M.match(/\d+/g);return"#"+K(N[0])+K(N[1])+K(N[2])}return M}O=O.parentNode}return"#ffffff"}function F(O,M,N){switch(O){case"round":return Math.round(N*(1-Math.cos(Math.asin(M/N))));case"cool":return Math.round(N*(1+Math.cos(Math.asin(M/N))));case"sharp":return Math.round(N*(1-Math.cos(Math.acos(M/N))));case"bite":return Math.round(N*(Math.cos(Math.asin((N-M-1)/N))));case"slide":return Math.round(N*(Math.atan2(M,N/M)));case"jut":return Math.round(N*(Math.atan2(N,(N-M-1))));case"curl":return Math.round(N*(Math.atan(M)));case"tear":return Math.round(N*(Math.cos(M)));case"wicked":return Math.round(N*(Math.tan(M)));case"long":return Math.round(N*(Math.sqrt(M)));case"sculpt":return Math.round(N*(Math.log((N-M-1),N)));case"dogfold":case"dog":return(M&1)?(M+1):N;case"dog2":return(M&2)?(M+1):N;case"dog3":return(M&3)?(M+1):N;case"fray":return(M%2)*N;case"notch":return N;case"bevelfold":case"bevel":return M+1}}C.fn.corner=function(M){if(this.length==0){if(!C.isReady&&this.selector){var N=this.selector,O=this.context;C(function(){C(N,O).corner(M)})}return this}return this.each(function(V){var U=C(this);var f=[U.attr(C.fn.corner.defaults.metaAttr)||"",M||""].join(" ").toLowerCase();var p=/keep/.test(f);var b=((f.match(/cc:(#[0-9a-f]+)/)||[])[1]);var P=((f.match(/sc:(#[0-9a-f]+)/)||[])[1]);var k=parseInt((f.match(/(\d+)px/)||[])[1])||10;var g=/round|bevelfold|bevel|notch|bite|cool|sharp|slide|jut|curl|tear|fray|wicked|sculpt|long|dog3|dog2|dogfold|dog/;var R=((f.match(g)||["round"])[0]);var S=/dogfold|bevelfold/.test(f);var Q={T:0,B:1};var Y={TL:/top|tl|left/.test(f),TR:/top|tr|right/.test(f),BL:/bottom|bl|left/.test(f),BR:/bottom|br|right/.test(f)};if(!Y.TL&&!Y.TR&&!Y.BL&&!Y.BR){Y={TL:1,TR:1,BL:1,BR:1}}if(C.fn.corner.defaults.useNative&&R=="round"&&(E||H||J)&&!b&&!P){if(Y.TL){U.css(E?"border-top-left-radius":H?"-moz-border-radius-topleft":"-webkit-border-top-left-radius",k+"px")}if(Y.TR){U.css(E?"border-top-right-radius":H?"-moz-border-radius-topright":"-webkit-border-top-right-radius",k+"px")}if(Y.BL){U.css(E?"border-bottom-left-radius":H?"-moz-border-radius-bottomleft":"-webkit-border-bottom-left-radius",k+"px")}if(Y.BR){U.css(E?"border-bottom-right-radius":H?"-moz-border-radius-bottomright":"-webkit-border-bottom-right-radius",k+"px")}return }var l=document.createElement("div");C(l).css({overflow:"hidden",height:"1px",minHeight:"1px",fontSize:"1px",backgroundColor:P||"transparent",borderStyle:"solid"});var s={T:parseInt(C.css(this,"paddingTop"))||0,R:parseInt(C.css(this,"paddingRight"))||0,B:parseInt(C.css(this,"paddingBottom"))||0,L:parseInt(C.css(this,"paddingLeft"))||0};if(typeof this.style.zoom!=undefined){this.style.zoom=1}if(!p){this.style.border="none"}l.style.borderColor=b||B(this.parentNode);var h=C(this).outerHeight();for(var m in Q){var X=Q[m];if((X&&(Y.BL||Y.BR))||(!X&&(Y.TL||Y.TR))){l.style.borderStyle="none "+(Y[m+"R"]?"solid":"none")+" none "+(Y[m+"L"]?"solid":"none");var t=document.createElement("div");C(t).addClass("jquery-corner");var a=t.style;X?this.appendChild(t):this.insertBefore(t,this.firstChild);if(X&&h!="auto"){if(C.css(this,"position")=="static"){this.style.position="relative"}a.position="absolute";a.bottom=a.left=a.padding=a.margin="0";if(I){a.setExpression("width","this.parentNode.offsetWidth")}else{a.width="100%"}}else{if(!X&&C.browser.msie){if(C.css(this,"position")=="static"){this.style.position="relative"}a.position="absolute";a.top=a.left=a.right=a.padding=a.margin="0";if(I){var q=G(this,"borderLeftWidth")+G(this,"borderRightWidth");a.setExpression("width","this.parentNode.offsetWidth - "+q+'+ "px"')}else{a.width="100%"}}else{a.position="relative";a.margin=!X?"-"+s.T+"px -"+s.R+"px "+(s.T-k)+"px -"+s.L+"px":(s.B-k)+"px -"+s.R+"px -"+s.B+"px -"+s.L+"px"}}for(var n=0;n<k;n++){var W=Math.max(0,F(R,n,k));var r=l.cloneNode(false);r.style.borderWidth="0 "+(Y[m+"R"]?W:0)+"px 0 "+(Y[m+"L"]?W:0)+"px";X?t.appendChild(r):t.insertBefore(r,t.firstChild)}if(S&&C.support.boxModel){if(X&&L){continue}for(var u in Y){if(!Y[u]){continue}if(X&&(u=="TL"||u=="TR")){continue}if(!X&&(u=="BL"||u=="BR")){continue}var Z={position:"absolute",border:"none",margin:0,padding:0,overflow:"hidden",backgroundColor:l.style.borderColor};var T=C("<div/>").css(Z).css({width:k+"px",height:"1px"});switch(u){case"TL":T.css({bottom:0,left:0});break;case"TR":T.css({bottom:0,right:0});break;case"BL":T.css({top:0,left:0});break;case"BR":T.css({top:0,right:0});break}t.appendChild(T[0]);var v=C("<div/>").css(Z).css({top:0,bottom:0,width:"1px",height:k+"px"});switch(u){case"TL":v.css({left:k});break;case"TR":v.css({right:k});break;case"BL":v.css({left:k});break;case"BR":v.css({right:k});break}t.appendChild(v[0])}}}}})};C.fn.uncorner=function(){if(E||H||J){this.css(E?"border-radius":H?"-moz-border-radius":"-webkit-border-radius",0)}C("div.jquery-corner",this).remove();return this};C.fn.corner.defaults={useNative:true,metaAttr:"data-corner"}})(jQuery);
// cluetip
(function(f){f.cluetip={version:"1.0.6"};var j,i,h,e,g,b,k,d;f.fn.cluetip=function(m,l){if(typeof m=="object"){l=m;m=null}if(m=="destroy"){return this.removeData("thisInfo").unbind(".cluetip")}return this.each(function(K){var t=this,w=f(this);var H=f.extend(true,{},f.fn.cluetip.defaults,l||{},f.metadata?w.metadata():f.meta?w.data():{});var p=false;var A=+H.cluezIndex;w.data("thisInfo",{title:t.title,zIndex:A});var S=false,R=0;if(!f("#cluetip").length){f(['<div id="cluetip">','<div id="cluetip-outer">','<div id="cluetip-outer-top">','<div id="cluetip-outer-top-left"></div>','<div id="cluetip-outer-top-middle"></div>','<div id="cluetip-outer-top-right"></div>',"</div>",'<div id="cluetip-outer-center">','<div id="cluetip-outer-left" ></div>','<div id="cluetip-outer-middle">','<h3 id="cluetip-title"></h3>','<div id="cluetip-inner"></div>',"</div>",'<div id="cluetip-outer-right" ></div>',"</div>",'<div id="cluetip-outer-bottom">','<div id="cluetip-outer-bottom-left"></div>','<div id="cluetip-outer-bottom-middle"></div>','<div id="cluetip-outer-bottom-right"></div>',"</div>","</div>",'<div id="cluetip-extra"></div>','<div id="cluetip-arrows" class="cluetip-arrows"></div>',"</div>"].join(""))[c](a).hide();j=f("#cluetip").css({position:"absolute"});h=f("#cluetip-outer").css({position:"relative",zIndex:A});i=f("#cluetip-inner");e=f("#cluetip-title");g=f("#cluetip-arrows");b=f('<div id="cluetip-waitimage"></div>').css({position:"absolute"}).insertBefore(j).hide()}var J=(H.dropShadow)?+H.dropShadowSteps:0;if(!k){k=f([]);for(var V=0;V<J;V++){k=k.add(f("<div></div>").css({zIndex:A-1,opacity:0.1,top:1+V,left:1+V}))}k.css({position:"absolute",backgroundColor:"#000"}).prependTo(j)}var F=w.attr(H.attribute),s=H.cluetipClass;if(!F&&!H.splitTitle&&!m){return true}if(H.local&&H.localPrefix){F=H.localPrefix+F}if(H.local&&H.hideLocal){f(F+":first").hide()}var G=parseInt(H.topOffset,10),C=parseInt(H.leftOffset,10);var B,T,y=isNaN(parseInt(H.height,10))?"auto":(/\D/g).test(H.height)?H.height:H.height+"px";var n,u,L,Z,N,U;var z=parseInt(H.width,10)||275,W=z+(parseInt(j.css("paddingLeft"),10)||0)+(parseInt(j.css("paddingRight"),10)||0)+J,D=this.offsetWidth,v,M,aa,O,o;var Q;var I=(H.attribute!="title")?w.attr(H.titleAttribute):"";if(H.splitTitle){if(I==undefined){I=""}Q=I.split(H.splitTitle);I=Q.shift()}if(H.escapeTitle){I=I.replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;")}var r;function Y(){return false}var x=function(ab){if(!H.onActivate(w)){return false}S=true;j.removeClass().css({width:z});if(F==w.attr("href")){w.css("cursor",H.cursor)}if(H.hoverClass){w.addClass(H.hoverClass)}u=L=w.offset().top;v=w.offset().left;O=ab.pageX;N=ab.pageY;if(t.tagName.toLowerCase()!="area"){n=f(document).scrollTop();o=f(window).width()}if(H.positionBy=="fixed"){M=D+v+C;j.css({left:M})}else{M=(D>v&&v>W)||v+D+W+C>o?v-W-C:D+v+C;if(t.tagName.toLowerCase()=="area"||H.positionBy=="mouse"||D+W>o){if(O+20+W>o){j.addClass(" cluetip-"+s);M=(O-W-C)>=0?O-W-C-parseInt(j.css("marginLeft"),10)+parseInt(i.css("marginRight"),10):O-(W/2)}else{M=O+C}}var ac=M<0?ab.pageY+G:ab.pageY;j.css({left:(M>0&&H.positionBy!="bottomTop")?M:(O+(W/2)>o)?o/2-W/2:Math.max(O-(W/2),0),zIndex:w.data("thisInfo").zIndex});g.css({zIndex:w.data("thisInfo").zIndex+1})}T=f(window).height();if(m){if(typeof m=="function"){m=m.call(t)}i.html(m);P(ac)}else{if(Q){var ae=Q.length;i.html(ae?Q[0]:"");if(ae>1){for(var ad=1;ad<ae;ad++){i.append('<div class="split-body">'+Q[ad]+"</div>")}}P(ac)}else{if(!H.local&&F.indexOf("#")!==0){if(/\.(jpe?g|tiff?|gif|png)$/i.test(F)){i.html('<img src="'+F+'" alt="'+I+'" />');P(ac)}else{if(p&&H.ajaxCache){i.html(p);P(ac)}else{var ai=H.ajaxSettings.beforeSend,af=H.ajaxSettings.error,ag=H.ajaxSettings.success,al=H.ajaxSettings.complete;var ak={cache:false,url:F,beforeSend:function(am){if(ai){ai.call(t,am,j,i)}h.children().empty();if(H.waitImage){b.css({top:N+20,left:O+20,zIndex:w.data("thisInfo").zIndex-1}).show()}},error:function(am,an){if(S){if(af){af.call(t,am,an,j,i)}else{i.html("<i>sorry, the contents could not be loaded</i>")}}},success:function(am,an){p=H.ajaxProcess.call(t,am);if(S){if(ag){ag.call(t,am,an,j,i)}i.html(p)}},complete:function(am,an){if(al){al.call(t,am,an,j,i)}d=f("#cluetip-inner img").length;if(d&&!f.browser.opera){f("#cluetip-inner img").bind("load error",function(){d--;if(d<1){b.hide();if(S){P(ac)}}})}else{b.hide();if(S){P(ac)}}}};var ah=f.extend(true,{},H.ajaxSettings,ak);f.ajax(ah)}}}else{if(H.local){var aj=f(F+(/#\S+$/.test(F)?"":":eq("+K+")")).clone(true).show();i.html(aj);P(ac)}}}}};var P=function(ad){j.addClass("cluetip-"+s);if(H.truncate){var ae=i.text().slice(0,H.truncate)+"...";i.html(ae)}function ab(){}I?e.show().html(I):(H.showTitle)?e.show().html("&nbsp;"):e.hide();if(H.sticky){var ac=f('<div id="cluetip-close"><a href="#">'+H.closeText+"</a></div>");(H.closePosition=="bottom")?ac.appendTo(i):(H.closePosition=="title")?ac.prependTo(e):ac.prependTo(i);ac.bind("click.cluetip",function(){E();return false});if(H.mouseOutClose){j.bind("mouseleave.cluetip",function(){E()})}else{j.unbind("mouseleave.cluetip")}}var af="";h.css({zIndex:w.data("thisInfo").zIndex,overflow:y=="auto"?"visible":"auto",height:y});B=y=="auto"?Math.max(j.outerHeight(),j.height()):parseInt(y,10);Z=L;U=n+T;if(H.positionBy=="fixed"){Z=L-H.dropShadowSteps+G}else{if((M<O&&Math.max(M,0)+W>O)||H.positionBy=="bottomTop"){if(L+B+G>U&&N-n>B+G){Z=N-B-G;af="top"}else{Z=N+G;af="bottom"}}else{if(L+B+G>U){Z=(B>=T)?n:U-B-G}else{if(w.css("display")=="block"||t.tagName.toLowerCase()=="area"||H.positionBy=="mouse"){Z=ad-G}else{Z=L-H.dropShadowSteps}}}}if(af==""){M<v?af="left":af="right"}j.css({top:Z+"px"}).removeClass().addClass("clue-"+af+"-"+s).addClass(" cluetip-"+s);if(H.arrows){var ag=(L-Z-H.dropShadowSteps);g.css({top:(/(left|right)/.test(af)&&M>=0&&ag>0)?ag+"px":/(left|right)/.test(af)?0:""}).show()}else{g.hide()}k.hide();j.hide()[H.fx.open](H.fx.openSpeed||0);if(H.dropShadow){k.css({height:B,width:z,zIndex:w.data("thisInfo").zIndex-1}).show()}if(f.fn.bgiframe){j.bgiframe()}if(H.delayedClose>0){R=setTimeout(E,H.delayedClose)}H.onShow.call(t,j,i)};var X=function(ab){S=false;b.hide();if(!H.sticky||(/click|toggle/).test(H.activation)){E();clearTimeout(R)}if(H.hoverClass){w.removeClass(H.hoverClass)}};var E=function(){h.parent().hide().removeClass();H.onHide.call(t,j,i);w.removeClass("cluetip-clicked");if(I){w.attr(H.titleAttribute,I)}w.css("cursor","");if(H.arrows){g.css({top:""})}};f(document).bind("hideCluetip",function(ab){E()});if((/click|toggle/).test(H.activation)){w.bind("click.cluetip",function(ab){if(j.is(":hidden")||!w.is(".cluetip-clicked")){x(ab);f(".cluetip-clicked").removeClass("cluetip-clicked");w.addClass("cluetip-clicked")}else{X(ab)}this.blur();return false})}else{if(H.activation=="focus"){w.bind("focus.cluetip",function(ab){x(ab)});w.bind("blur.cluetip",function(ab){X(ab)})}else{w[H.clickThrough?"unbind":"bind"]("click",Y);var q=function(ab){if(H.tracking==true){var ad=M-ab.pageX;var ac=Z?Z-ab.pageY:L-ab.pageY;w.bind("mousemove.cluetip",function(ae){j.css({left:ae.pageX+ad,top:ae.pageY+ac})})}};if(f.fn.hoverIntent&&H.hoverIntent){w.hoverIntent({sensitivity:H.hoverIntent.sensitivity,interval:H.hoverIntent.interval,over:function(ab){x(ab);q(ab)},timeout:H.hoverIntent.timeout,out:function(ab){X(ab);w.unbind("mousemove.cluetip")}})}else{w.bind("mouseenter.cluetip",function(ab){x(ab);q(ab)}).bind("mouseleave.cluetip",function(ab){X(ab);w.unbind("mousemove.cluetip")})}w.bind("mouseover.cluetip",function(ab){w.attr("title","")}).bind("mouseleave.cluetip",function(ab){w.attr("title",w.data("thisInfo").title)})}}})};f.fn.cluetip.defaults={width:275,height:"auto",cluezIndex:97,positionBy:"auto",topOffset:15,leftOffset:15,local:false,localPrefix:null,hideLocal:true,attribute:"rel",titleAttribute:"title",splitTitle:"",escapeTitle:false,showTitle:true,cluetipClass:"default",hoverClass:"",waitImage:true,cursor:"help",arrows:false,dropShadow:true,dropShadowSteps:6,sticky:false,mouseOutClose:false,activation:"hover",clickThrough:false,tracking:false,delayedClose:0,closePosition:"top",closeText:"Close",truncate:0,fx:{open:"show",openSpeed:""},hoverIntent:{sensitivity:3,interval:50,timeout:0},onActivate:function(l){return true},onShow:function(m,l){},onHide:function(m,l){},ajaxCache:true,ajaxProcess:function(l){l=l.replace(/<(script|style|title)[^<]+<\/(script|style|title)>/gm,"").replace(/<(link|meta)[^>]+>/g,"");return l},ajaxSettings:{dataType:"html"},debug:false};var c="appendTo",a="body";f.cluetip.setup=function(l){if(l&&l.insertionType&&(l.insertionType).match(/appendTo|prependTo|insertBefore|insertAfter/)){c=l.insertionType}if(l&&l.insertionElement){a=l.insertionElement}}})(jQuery);
// jquery.greyBoxExtend.js
greyBoxInitialized=false;greyBoxShowing=false;greyBoxHoverIntentConfig={sensitivity:3,interval:200,over:function(){},timeout:500,out:function(){}};greyBoxCloseFunction=function(){};jQuery.ShowGreyBox=function(C,B,A){if(greyBoxShowing){return }greyBoxShowing=true;greyBoxSettings=jQuery.extend({height:"auto",width:550,onGreyBoxShow:function(){},onGreyBoxExit:function(){},onGreyBoxError:function(){},attachGreyBoxElementsTo:"#sidebar",localElementSelector:""},B);var D=jQuery.extend({url:C,type:"post",dataType:"html",cache:false,success:function(F){GreyBox.gbSuccess(F)},error:function(F,H,G){greyBoxSettings.onGreyBoxError()}},A);if(!greyBoxInitialized){try{GreyBox.initialize()}catch(E){}}greyBoxCloseFunction=greyBoxSettings.onGreyBoxExit;GreyBox.gbShowWindow(D);greyBoxSettings.onGreyBoxShow()};var GreyBox={initialize:function(){greyBoxInitialized=true;if(typeof document.body.style.maxHeight==="undefined"&&("https:"!=document.location.protocol)){jQuery(greyBoxSettings.attachGreyBoxElementsTo).append('<iframe id="greyBoxHideSelect"></iframe>')}jQuery(greyBoxSettings.attachGreyBoxElementsTo).append('<div id="greyBoxOverlay"></div><div id="greyBoxWindow"><div style="width:100%;"><div id="greyBoxClose"><div id="greyBoxCloseImg"></div><p>Close</p></div><div id="greyBoxContent"></div></div></div>');jQuery(greyBoxSettings.attachGreyBoxElementsTo).css({"z-index":0});jQuery(window).resize(GreyBox.position);jQuery(window).scroll(GreyBox.position);jQuery("#greyBoxOverlay,#greyBoxClose").click(function(){GreyBox.gbClose()});document.onkeyup=function(A){if(A==null){keycode=event.keyCode}else{keycode=A.which}if(keycode==27){GreyBox.gbClose()}}},gbClose:function(){jQuery("#greyBoxWindow,#greyBoxOverlay").slideUp();if(typeof document.body.style.maxHeight==="undefined"){jQuery("#greyBoxHideSelect").hide()}greyBoxShowing=false;greyBoxCloseFunction()},gbPosition:function(){if(greyBoxShowing){var B=greyBoxSettings.width;var A=greyBoxSettings.height;jQuery("#greyBoxWindow").css({width:B+"px",height:A});GreyBox.centerWindow()}},gbShowWindow:function(A){if(greyBoxSettings.localElementSelector==""||A.url!=""){jQuery.ajax(A);if(jQuery("#greyBoxWindow").css("height")!=greyBoxSettings.height){jQuery("#greyBoxWindow").css("height",greyBoxSettings.height)}}else{GreyBox.gbSuccess(jQuery(greyBoxSettings.localElementSelector).html());GreyBox.gbPosition();greyBoxSettings.onGreyBoxShow()}},centerWindow:function(){jQuery("#greyBoxWindow").css("marginLeft","-"+parseInt((greyBoxSettings.width/2),10)+"px");if(!(jQuery.browser.msie&&jQuery.browser.version<7)){curTop=GreyBox.gbWindowHeight();if(curTop!=0){jQuery("#greyBoxWindow").css("marginTop","-"+curTop+"px")}}},gbWindowHeight:function(){curTop=(parseInt(document.getElementById("greyBoxWindow").offsetHeight,10)/2);return curTop},gbSuccess:function(A){jQuery("#greyBoxContent").html(A);jQuery("#greyBoxOverlay").show();jQuery("#greyBoxHideSelect").show();jQuery("#greyBoxWindow").show();greyBoxShowing=true;GreyBox.centerWindow()}};jQuery.each(GreyBox,function(A){jQuery.fn[A]=this});
/*
 * jQuery QuickFlip v2.1.1
 * http://jonraasch.com/blog/quickflip-2-jquery-plugin
 *
 * Copyright (c) 2009 Jon Raasch (http://jonraasch.com/)
 * Licensed under the FreeBSD License:
 * http://dev.jonraasch.com/quickflip/docs#licensing
 *
 */
(function(c){var a=false,b=null;c.quickFlip={wrappers:[],opts:[],objs:[],init:function(d,f){var d=d||{};d.closeSpeed=d.closeSpeed||180;d.openSpeed=d.openSpeed||120;d.ctaSelector=d.ctaSelector||".quickFlipCta";d.refresh=d.refresh||a;d.easing=d.easing||"swing";d.noResize=d.noResize||a;d.vertical=d.vertical||a;var g=typeof(f)!="undefined"?c(f):c(".quickFlip"),h=g.children();if(g.css("position")=="static"){g.css("position","relative")}var e=c.quickFlip.wrappers.length;h.each(function(i){var k=c(this);if(d.ctaSelector){k.find(d.ctaSelector).click(function(j){j.preventDefault();c.quickFlip.flip(e)})}if(i){k.hide()}});c.quickFlip.opts.push(d);c.quickFlip.objs.push({$box:c(g),$kids:c(h)});c.quickFlip.build(e);if(!d.noResize){c(window).resize(function(){for(var j=0;j<c.quickFlip.wrappers.length;j++){c.quickFlip.removeFlipDivs(j);c.quickFlip.build(j)}})}},build:function(f,h){c.quickFlip.opts[f].panelWidth=c.quickFlip.opts[f].panelWidth||c.quickFlip.objs[f].$box.width();c.quickFlip.opts[f].panelHeight=c.quickFlip.opts[f].panelHeight||c.quickFlip.objs[f].$box.height();var e=c.quickFlip.opts[f],g={wrapper:c.quickFlip.objs[f].$box,index:f,half:parseInt((e.vertical?e.panelHeight:e.panelWidth)/2),panels:[],flipDivs:[],flipDivCols:[],currPanel:h||0,options:e};c.quickFlip.objs[f].$kids.each(function(k){var i=c(this).css({position:"absolute",top:0,left:0,margin:0,padding:0,width:e.panelWidth,height:e.panelHeight});g.panels[k]=i;var l=d(g,k).hide().appendTo(g.wrapper);g.flipDivs[k]=l;g.flipDivCols[k]=l.children()});c.quickFlip.wrappers[f]=g;function d(i,p){function o(q,t){var r=c("<div></div>"),s=q.panels[t].clone().show();r.css(l);r.html(s);return r}var n=c("<div></div>"),j=i.panels[p].html(),l={width:e.vertical?e.panelWidth:i.half,height:e.vertical?i.half:e.panelHeight,position:"absolute",overflow:"hidden",margin:0,padding:0};if(e.vertical){l.left=0}else{l.top=0}var m=c(o(i,p)).appendTo(n),k=c(o(i,p)).appendTo(n);if(e.vertical){m.css("bottom",i.half);k.css("top",i.half);k.children().css({top:b,bottom:0})}else{m.css("right",i.half);k.css("left",i.half);k.children().css({right:0,left:"auto"})}return n}},flip:function(g,q,l,r){function h(j,i){j=j||{};i=i||{};for(opt in j){i[opt]=j[opt]}return i}if(typeof g!="number"||typeof c.quickFlip.wrappers[g]=="undefined"){return}var n=c.quickFlip.wrappers[g],f=n.currPanel,e=(typeof(q)!="undefined"&&q!=b)?q:(n.panels.length>f+1)?f+1:0;n.currPanel=e,l=(typeof(l)!="undefined"&&l!=b)?l:1;r=h(r,c.quickFlip.opts[g]);n.panels[f].hide();if(r.refresh){c.quickFlip.removeFlipDivs(g);c.quickFlip.build(g,e);n=c.quickFlip.wrappers[g]}n.flipDivs[f].show();var p=0,o=0,d=r.vertical?{height:0}:{width:0},m=r.vertical?{height:n.half}:{width:n.half};n.flipDivCols[f].animate(d,r.closeSpeed,r.easing,function(){if(!p){p++}else{n.flipDivs[e].show();n.flipDivCols[e].css(d);n.flipDivCols[e].animate(m,r.openSpeed,r.easing,function(){if(!o){o++}else{n.flipDivs[e].hide();n.panels[e].show();switch(l){case 0:case -1:c.quickFlip.flip(g,b,-1);break;case 1:break;default:c.quickFlip.flip(g,b,l-1);break}}})}})},removeFlipDivs:function(e){for(var d=0;d<c.quickFlip.wrappers[e].flipDivs.length;d++){c.quickFlip.wrappers[e].flipDivs[d].remove()}}};c.fn.quickFlip=function(d){this.each(function(){new c.quickFlip.init(d,this)});return this};c.fn.whichQuickFlip=function(){function f(j,h){if(!j||!h||!j.length||!h.length||j.length!=h.length){return a}for(var g=0;g<j.length;g++){if(j[g]!==h[g]){return a}}return true}var d=b;for(var e=0;e<c.quickFlip.wrappers.length;e++){if(f(this,c(c.quickFlip.wrappers[e].wrapper))){d=e}}return d};c.fn.quickFlipper=function(d,f,e){this.each(function(){var h=c(this),g=h.whichQuickFlip();if(g==b){h.quickFlip(d);g=h.whichQuickFlip()}c.quickFlip.flip(g,f,e,d)})}})(jQuery);
