var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y<X;Y++){U[Y]()}}function K(X){if(J){X()}else{U[U.length]=X}}function s(Y){if(typeof O.addEventListener!=D){O.addEventListener("load",Y,false)}else{if(typeof j.addEventListener!=D){j.addEventListener("load",Y,false)}else{if(typeof O.attachEvent!=D){i(O,"onload",Y)}else{if(typeof O.onload=="function"){var X=O.onload;O.onload=function(){X();Y()}}else{O.onload=Y}}}}}function h(){if(T){V()}else{H()}}function V(){var X=j.getElementsByTagName("body")[0];var aa=C(r);aa.setAttribute("type",q);var Z=X.appendChild(aa);if(Z){var Y=0;(function(){if(typeof Z.GetVariable!=D){var ab=Z.GetVariable("$version");if(ab){ab=ab.split(" ")[1].split(",");M.pv=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}else{if(Y<10){Y++;setTimeout(arguments.callee,10);return}}X.removeChild(aa);Z=null;H()})()}else{H()}}function H(){var ag=o.length;if(ag>0){for(var af=0;af<ag;af++){var Y=o[af].id;var ab=o[af].callbackFn;var aa={success:false,id:Y};if(M.pv[0]>0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad<ac;ad++){if(X[ad].getAttribute("name").toLowerCase()!="movie"){ah[X[ad].getAttribute("name")]=X[ad].getAttribute("value")}}P(ai,ah,Y,ab)}else{p(ae);if(ab){ab(aa)}}}}}else{w(Y,true);if(ab){var Z=z(Y);if(Z&&typeof Z.SetVariable!=D){aa.success=true;aa.ref=Z}ab(aa)}}}}}function z(aa){var X=null;var Y=c(aa);if(Y&&Y.nodeName=="OBJECT"){if(typeof Y.SetVariable!=D){X=Y}else{var Z=Y.getElementsByTagName(r)[0];if(Z){X=Z}}}return X}function A(){return!a&&F("6.0.65")&&(M.win||M.mac)&&!(M.wk&&M.wk<312)}function P(aa,ab,X,Z){a=true;E=Z||null;B={success:false,id:X};var ae=c(X);if(ae){if(ae.nodeName=="OBJECT"){l=g(ae);Q=null}else{l=ae;Q=X}aa.id=R;if(typeof aa.width==D||(!/%$/.test(aa.width)&&parseInt(aa.width,10)<310)){aa.width="310"}if(typeof aa.height==D||(!/%$/.test(aa.height)&&parseInt(aa.height,10)<137)){aa.height="137"}j.title=j.title.slice(0,47)+" - Flash Player Installation";var ad=M.ie&&M.win?"ActiveX":"PlugIn",ac="MMredirectURL="+O.location.toString().replace(/&/g,"%26")+"&MMplayerType="+ad+"&MMdoctitle="+j.title;if(typeof ab.flashvars!=D){ab.flashvars+="&"+ac}else{ab.flashvars=ac}if(M.ie&&M.win&&ae.readyState!=4){var Y=C("div");X+="SWFObjectNew";Y.setAttribute("id",X);ae.parentNode.insertBefore(Y,ae);ae.style.display="none";(function(){if(ae.readyState==4){ae.parentNode.removeChild(ae)}else{setTimeout(arguments.callee,10)}})()}u(aa,ab,X)}}function p(Y){if(M.ie&&M.win&&Y.readyState!=4){var X=C("div");Y.parentNode.insertBefore(X,Y);X.parentNode.replaceChild(g(Y),X);Y.style.display="none";(function(){if(Y.readyState==4){Y.parentNode.removeChild(Y)}else{setTimeout(arguments.callee,10)}})()}else{Y.parentNode.replaceChild(g(Y),Y)}}function g(ab){var aa=C("div");if(M.win&&M.ie){aa.innerHTML=ab.innerHTML}else{var Y=ab.getElementsByTagName(r)[0];if(Y){var ad=Y.childNodes;if(ad){var X=ad.length;for(var Z=0;Z<X;Z++){if(!(ad[Z].nodeType==1&&ad[Z].nodeName=="PARAM")&&!(ad[Z].nodeType==8)){aa.appendChild(ad[Z].cloneNode(true))}}}}}return aa}function u(ai,ag,Y){var X,aa=c(Y);if(M.wk&&M.wk<312){return X}if(aa){if(typeof ai.id==D){ai.id=Y}if(M.ie&&M.win){var ah="";for(var ae in ai){if(ai[ae]!=Object.prototype[ae]){if(ae.toLowerCase()=="data"){ag.movie=ai[ae]}else{if(ae.toLowerCase()=="styleclass"){ah+=' class="'+ai[ae]+'"'}else{if(ae.toLowerCase()!="classid"){ah+=" "+ae+'="'+ai[ae]+'"'}}}}}var af="";for(var ad in ag){if(ag[ad]!=Object.prototype[ad]){af+='<param name="'+ad+'" value="'+ag[ad]+'" />'}}aa.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ah+">"+af+"</object>";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab<ac;ab++){I[ab][0].detachEvent(I[ab][1],I[ab][2])}var Z=N.length;for(var aa=0;aa<Z;aa++){y(N[aa])}for(var Y in M){M[Y]=null}M=null;for(var X in swfobject){swfobject[X]=null}swfobject=null})}}();return{registerObject:function(ab,X,aa,Z){if(M.w3&&ab&&X){var Y={};Y.id=ab;Y.swfVersion=X;Y.expressInstall=aa;Y.callbackFn=Z;o[o.length]=Y;w(ab,false)}else{if(Z){Z({success:false,id:ab})}}},getObjectById:function(X){if(M.w3){return z(X)}},embedSWF:function(ab,ah,ae,ag,Y,aa,Z,ad,af,ac){var X={success:false,id:ah};if(M.w3&&!(M.wk&&M.wk<312)&&ab&&ah&&ae&&ag&&Y){w(ah,false);K(function(){ae+="";ag+="";var aj={};if(af&&typeof af===r){for(var al in af){aj[al]=af[al]}}aj.data=ab;aj.width=ae;aj.height=ag;var am={};if(ad&&typeof ad===r){for(var ak in ad){am[ak]=ad[ak]}}if(Z&&typeof Z===r){for(var ai in Z){if(typeof am.flashvars!=D){am.flashvars+="&"+ai+"="+Z[ai]}else{am.flashvars=ai+"="+Z[ai]}}}if(F(Y)){var an=u(aj,am,ah);if(aj.id==ah){w(ah,true)}X.success=true;X.ref=an}else{if(aa&&A()){aj.data=aa;P(aj,am,ah,ac);return}else{w(ah,true)}}if(ac){ac(X)}})}else{if(ac){ac(X)}}},switchOffAutoHideShow:function(){m=false},ua:M,getFlashPlayerVersion:function(){return{major:M.pv[0],minor:M.pv[1],release:M.pv[2]}},hasFlashPlayerVersion:F,createSWF:function(Z,Y,X){if(M.w3){return u(Z,Y,X)}else{return undefined}},showExpressInstall:function(Z,aa,X,Y){if(M.w3&&A()){P(Z,aa,X,Y)}},removeSWF:function(X){if(M.w3){y(X)}},createCSS:function(aa,Z,Y,X){if(M.w3){v(aa,Z,Y,X)}},addDomLoadEvent:K,addLoadEvent:s,getQueryParamValue:function(aa){var Z=j.location.search||j.location.hash;if(Z){if(/\?/.test(Z)){Z=Z.split("?")[1]}if(aa==null){return L(Z)}var Y=Z.split("&");for(var X=0;X<Y.length;X++){if(Y[X].substring(0,Y[X].indexOf("="))==aa){return L(Y[X].substring((Y[X].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(a){var X=c(R);if(X&&l){X.parentNode.replaceChild(l,X);if(Q){w(Q,true);if(M.ie&&M.win){l.style.display="block"}}if(E){E(B)}}a=false}}}}();;(function($){$.fn.rotatingtext=function(o){if(o.fadeinspeed==undefined)o.fadeinspeed=1800;if(o.fadedisplay==undefined)o.fadedisplay=1080;if(o.fadeoutspeed==undefined)o.fadeoutspeed=1800;if(o.fadetimeout==undefined)o.fadetimeout=500;if(o.current==undefined)o.current='current';var count;count=0;var element;$(this).each(function(){element=$(this);rotate();function checkit(){if(count>=($(element).children().size()-1)){count=0;}
else{count++;}
rotate();}
function rotate(){o.current=$(element).children().eq(count);o.current.fadeIn(o.fadeinspeed,function(){setTimeout(function(){o.current.fadeOut(o.fadeoutspeed,function(){setTimeout(function(){checkit();},o.fadetimeout)});},o.fadedisplay);});}});}})(jQuery);;(function($){$.pbvideosc={version:'3.0'};$.fn.pbvideosc=function(pbv_settings){pbv_settings=jQuery.extend({animation_speed:'fast',slideshow:false,autoplay_slideshow:false,opacity:0.80,show_title:true,allow_resize:true,default_width:500,default_height:344,counter_separator_label:'/',theme:'default',hideflash:false,wmode:'opaque',autoplay:true,norelated:false,pluginpath:'',modal:false,overlay_gallery:true,keyboard_shortcuts:true,changepicturecallback:function(){},callback:function(){},markup:'<div class="pbv_pic_holder"> \
      <div class="pbvt">&nbsp;</div> \
      <div class="pbv_top"> \
       <div class="pbv_left"></div> \
       <div class="pbv_middle"></div> \
       <div class="pbv_right"></div> \
      </div> \
      <div class="pbv_content_container"> \
       <div class="pbv_left"> \
       <div class="pbv_right"> \
        <div class="pbv_content"> \
         <div class="pbv_loaderIcon"></div> \
         <div class="pbv_fade"> \
          <a href="#" class="pbv_expand" title="Expand the image">Expand</a> \
          <div class="pbv_hoverContainer"> \
           <a class="pbv_next" href="#">next</a> \
           <a class="pbv_previous" href="#">previous</a> \
          </div> \
          <div id="pbv_full_res"></div> \
          <div class="pbv_details clearfix"> \
           <p class="pbv_description"></p> \
           <a class="pbv_close" href="#">Close</a> \
           <div class="pbv_nav"> \
            <a href="#" class="pbv_arrow_previous">Previous</a> \
            <p class="currentTextHolder">0/0</p> \
            <a href="#" class="pbv_arrow_next">Next</a> \
           </div> \
          </div> \
         </div> \
        </div> \
       </div> \
       </div> \
      </div> \
      <div class="pbv_bottom"> \
       <div class="pbv_left"></div> \
       <div class="pbv_middle"></div> \
       <div class="pbv_right"></div> \
      </div> \
     </div> \
     <div class="pbv_overlay"></div>',gallery_markup:'<div class="pbv_gallery"> \
        <a href="#" class="pbv_arrow_previous">Previous</a> \
        <ul> \
         {gallery} \
        </ul> \
        <a href="#" class="pbv_arrow_next">Next</a> \
       </div>',image_markup:'<img id="fullResImage" src="" />',flash_markup:'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="{width}" height="{height}"><param name="wmode" value="{wmode}" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="{path}" /><embed src="{path}" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="{width}" height="{height}" wmode="{wmode}"></embed></object>',quicktime_markup:'<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="{height}" width="{width}"><param name="src" value="{path}"><param name="autoplay" value="{autoplay}"><param name="type" value="video/quicktime"><embed src="{path}" height="{height}" width="{width}" autoplay="{autoplay}" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/"></embed></object>',iframe_markup:'<iframe src ="{path}" width="{width}" height="{height}" frameborder="no" webkitAllowFullScreen allowFullScreen></iframe>',vimeo_oldmarkup:'<iframe src ="{path}" width="{width}" height="{height}" frameborder="no" webkitAllowFullScreen allowFullScreen></iframe>',openplayer:'<iframe src ="{path}" width="{width}" height="{height}" marginheight="0" marginwidth="0" scrolling="no" frameborder="0">no iframe doom</iframe>'},pbv_settings);var matchedObjects=this,percentBased=false,correctSizes,pbv_open,pbv_contentHeight,pbv_contentWidth,pbv_containerHeight,pbv_containerWidth,windowHeight=$(window).height(),windowWidth=$(window).width(),pbv_slideshow;doresize=true,scroll_pos=_get_scroll();$(window).unbind('resize').resize(function(){_center_overlay();_resize_overlay();});if(pbv_settings.keyboard_shortcuts){$(document).unbind('keydown').keydown(function(e){if(typeof $pbv_pic_holder!='undefined'){if($pbv_pic_holder.is(':visible')){switch(e.keyCode){case 37:$.pbvideosc.changePage('previous');break;case 39:$.pbvideosc.changePage('next');break;case 27:if(!pbv_settings.modal)
$.pbvideosc.close();break;};return false;};};});}
$.pbvideosc.initialize=function(){settings=pbv_settings;if($.browser.msie&&parseInt($.browser.version)==6){if((settings.theme=="dark_rounded")||(settings.theme=="dark_square")||(settings.theme=="darker_square")){settings.theme="darker_square";}
else{settings.theme="light_square";}}
_buildOverlay(this);if(settings.allow_resize)
$(window).scroll(function(){_center_overlay();});_center_overlay();set_position=jQuery.inArray($(this).attr('href'),pbv_images);$.pbvideosc.open();return false;}
$.pbvideosc.open=function(){settings=pbv_settings;if(typeof settings=="undefined"){if($.browser.msie&&parseInt($.browser.version)==6){if((settings.theme=="dark_rounded")||(settings.theme=="dark_square")||(settings.theme=="darker_square")){settings.theme="darker_square";}
else{settings.theme="light_square";}}
_buildOverlay(this);pbv_images=$.makeArray(arguments[0]);pbv_titles=(arguments[1])?$.makeArray(arguments[1]):$.makeArray("");pbv_descriptions=(arguments[2])?$.makeArray(arguments[2]):$.makeArray("");isSet=(pbv_images.length>1)?true:false;set_position=0;}
if($.browser.msie&&$.browser.version==6)$('select').css('visibility','hidden');if(settings.hideflash)$('object,embed').css('visibility','hidden');_checkPosition($(pbv_images).size());$('.pbv_loaderIcon').show();if($pbvt.is(':hidden'))$pbvt.css('opacity',0).show();$pbv_overlay.show().fadeTo(settings.animation_speed,settings.opacity);$pbv_pic_holder.find('.currentTextHolder').text((set_position+1)+settings.counter_separator_label+$(pbv_images).size());$pbv_pic_holder.find('.pbv_description').show().html(unescape(pbv_descriptions[set_position]));(settings.show_title&&pbv_titles[set_position]!="")?$pbvt.html(unescape(pbv_titles[set_position])):$pbvt.html('&nbsp;');movie_width=(parseFloat(grab_param('width',pbv_images[set_position])))?grab_param('width',pbv_images[set_position]):settings.default_width.toString();movie_height=(parseFloat(grab_param('height',pbv_images[set_position])))?grab_param('height',pbv_images[set_position]):settings.default_height.toString();if(movie_width.indexOf('%')!=-1||movie_height.indexOf('%')!=-1){movie_height=parseFloat(($(window).height()*parseFloat(movie_height)/100)-150);movie_width=parseFloat(($(window).width()*parseFloat(movie_width)/100)-150);percentBased=true;}else{percentBased=false;}
$pbv_pic_holder.fadeIn(function(){settings=pbv_settings;imgPreloader="";switch(_getFileType(pbv_images[set_position])){case'youtube':correctSizes=_fitToViewport(movie_width,movie_height);movie='http://www.youtube.com/v/'+grab_param('v',pbv_images[set_position]);if(settings.autoplay)movie+="&fs=1&autoplay=1";if(settings.norelated=='true')movie+="&rel=0";toInject=settings.flash_markup.replace(/{width}/g,correctSizes['width']).replace(/{height}/g,correctSizes['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,movie);break;case'vimeo':correctSizes=_fitToViewport(movie_width,movie_height);movie=pbv_images[set_position];movie=movie+'?autoplay=1&amp;title=0&amp;byline=0&amp;portrait=0&amp;color=00ADEF&amp;fullscreen=1&amp;loop=0';vimeo_width=correctSizes['width']+'/embed/?moog_width='+correctSizes['width'];toInject=settings.vimeo_oldmarkup.replace(/{width}/g,correctSizes['width']).replace(/{height}/g,correctSizes['height']).replace(/{path}/g,movie);break;case'quicktime':correctSizes=_fitToViewport(movie_width,movie_height);correctSizes['height']+=15;correctSizes['contentHeight']+=15;correctSizes['containerHeight']+=15;toInject=settings.quicktime_markup.replace(/{width}/g,correctSizes['width']).replace(/{height}/g,correctSizes['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,pbv_images[set_position]).replace(/{autoplay}/g,settings.autoplay);break;case'flash':correctSizes=_fitToViewport(movie_width,movie_height);flash_vars=pbv_images[set_position];flash_vars=flash_vars.substring(pbv_images[set_position].indexOf('flashvars')+10,pbv_images[set_position].length);filename=pbv_images[set_position];filename=filename.substring(0,filename.indexOf('?'));toInject=settings.flash_markup.replace(/{width}/g,correctSizes['width']).replace(/{height}/g,correctSizes['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,filename+'?'+flash_vars);break;case'iframe':correctSizes=_fitToViewport(movie_width,movie_height);frame_url=pbv_images[set_position];frame_url=frame_url.substr(0,frame_url.indexOf('iframe')-1);toInject=settings.iframe_markup.replace(/{width}/g,correctSizes['width']).replace(/{height}/g,correctSizes['height']).replace(/{path}/g,frame_url);break;case'openplayer':correctSizes=_fitToViewport(movie_width,movie_height);flash_vars=pbv_images[set_position];flash_vars=flash_vars.substring(pbv_images[set_position].indexOf('flashvars')+10,pbv_images[set_position].length);filename=pbv_images[set_position];cwidth=(correctSizes['width']);cheight=(correctSizes['height']);toInject=settings.openplayer.replace(/{width}/g,correctSizes['width']).replace(/{height}/g,correctSizes['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,filename+'&width='+cwidth+'&height='+cheight).replace(/{plugpth}/g,settings.pluginpath);break;};if(!imgPreloader){$pbv_pic_holder.find('#pbv_full_res')[0].innerHTML=toInject;_showContent();};});return false;};$.pbvideosc.close=function(){settings=pbv_settings;clearInterval(pbv_slideshow);$pbv_pic_holder.stop().find('object,embed').css('visibility','hidden');$('div.pbv_pic_holder,div.pbvt,.pbv_fade').fadeOut(settings.animation_speed,function(){$(this).remove();});$pbv_overlay.fadeOut(settings.animation_speed,function(){settings=pbv_settings;if($.browser.msie&&$.browser.version==6)$('select').css('visibility','visible');if(pbv_settings.hideflash)$('object,embed').css('visibility','visible');$(this).remove();$(window).unbind('scroll');pbv_settings.callback();doresize=true;pbv_open=false;delete pbv_settings;});};_showContent=function(){settings=pbv_settings;$('.pbv_loaderIcon').hide();$pbvt.fadeTo(settings.animation_speed,1);projectedTop=scroll_pos['scrollTop']+((windowHeight/2)-(correctSizes['containerHeight']/2));if(projectedTop<0)projectedTop=0;$pbv_pic_holder.find('.pbv_content').animate({'height':correctSizes['contentHeight']},settings.animation_speed);$pbv_pic_holder.animate({'top':projectedTop,'left':(windowWidth/2)-(correctSizes['containerWidth']/2),'width':correctSizes['containerWidth']},settings.animation_speed,function(){settings=pbv_settings;$pbv_pic_holder.find('.pbv_hoverContainer,#fullResImage').height(correctSizes['height']).width(correctSizes['width']);$pbv_pic_holder.find('.pbv_fade').fadeIn(settings.animation_speed);if(isSet&&_getFileType(pbv_images[set_position])=="image"){$pbv_pic_holder.find('.pbv_hoverContainer').show();}else{$pbv_pic_holder.find('.pbv_hoverContainer').hide();}
if(correctSizes['resized'])$('a.pbv_expand,a.pbv_contract').fadeIn(settings.animation_speed);if(settings.autoplay_slideshow&&!pbv_slideshow&&!pbv_open)$.pbvideosc.startSlideshow();settings.changepicturecallback();pbv_open=true;});_insert_gallery();};function _hideContent(callback){settings=pbv_settings;$pbv_pic_holder.find('#pbv_full_res object,#pbv_full_res embed').css('visibility','hidden');$pbv_pic_holder.find('.pbv_fade').fadeOut(settings.animation_speed,function(){$('.pbv_loaderIcon').show();callback();});};function _checkPosition(setCount){if(set_position==setCount-1){$pbv_pic_holder.find('a.pbv_next').css('visibility','hidden');$pbv_pic_holder.find('a.pbv_next').addClass('disabled').unbind('click');}else{$pbv_pic_holder.find('a.pbv_next').css('visibility','visible');$pbv_pic_holder.find('a.pbv_next.disabled').removeClass('disabled').bind('click',function(){$.pbvideosc.changePage('next');return false;});};if(set_position==0){$pbv_pic_holder.find('a.pbv_previous').css('visibility','hidden').addClass('disabled').unbind('click');}else{$pbv_pic_holder.find('a.pbv_previous.disabled').css('visibility','visible').removeClass('disabled').bind('click',function(){$.pbvideosc.changePage('previous');return false;});};(setCount>1)?$('.pbv_nav').show():$('.pbv_nav').hide();};function _fitToViewport(width,height){settings=pbv_settings;resized=false;_getDimensions(width,height);imageWidth=width,imageHeight=height;if(((pbv_containerWidth>windowWidth)||(pbv_containerHeight>windowHeight))&&doresize&&settings.allow_resize&&!percentBased){resized=true,fitting=false;while(!fitting){if((pbv_containerWidth>windowWidth)){imageWidth=(windowWidth-200);imageHeight=(height/width)*imageWidth;}else if((pbv_containerHeight>windowHeight)){imageHeight=(windowHeight-200);imageWidth=(width/height)*imageHeight;}else{fitting=true;};pbv_containerHeight=imageHeight,pbv_containerWidth=imageWidth;};_getDimensions(imageWidth,imageHeight);};return{width:Math.floor(imageWidth),height:Math.floor(imageHeight),containerHeight:Math.floor(pbv_containerHeight),containerWidth:Math.floor(pbv_containerWidth)+40,contentHeight:Math.floor(pbv_contentHeight),contentWidth:Math.floor(pbv_contentWidth),resized:resized};};function _getDimensions(width,height){width=parseFloat(width);height=parseFloat(height);$pbv_details=$pbv_pic_holder.find('.pbv_details');$pbv_details.width(width);detailsHeight=parseFloat($pbv_details.css('marginTop'))+parseFloat($pbv_details.css('marginBottom'));$pbv_details=$pbv_details.clone().appendTo($('body')).css({'position':'absolute','top':-10000});detailsHeight+=$pbv_details.height();detailsHeight=(detailsHeight<=34)?36:detailsHeight;if($.browser.msie&&$.browser.version==7)detailsHeight+=8;$pbv_details.remove();pbv_contentHeight=height+detailsHeight;pbv_contentWidth=width;pbv_containerHeight=pbv_contentHeight+$pbvt.height()+$pbv_pic_holder.find('.pbv_top').height()+$pbv_pic_holder.find('.pbv_bottom').height();pbv_containerWidth=width;}
function _getFileType(itemSrc){if(itemSrc.match(/youtube\.com\/watch/i)){return'youtube';}else if(itemSrc.match(/vimeo\.com/i)){return'vimeo';}else if(itemSrc.indexOf('.mov')!=-1){return'quicktime';}else if(itemSrc.indexOf('.swf')!=-1){return'flash';}else if(itemSrc.indexOf('iframe')!=-1){return'iframe';}else if((itemSrc.indexOf('mp4')!=-1)||(itemSrc.indexOf('flv')!=-1)||(itemSrc.indexOf('3gp')!=-1)||(itemSrc.indexOf('avi')!=-1)){return'openplayer';}else if(itemSrc.substr(0,1)=='#'){return'inline';}else{return'image';};};function _center_overlay(){if(doresize&&typeof $pbv_pic_holder!='undefined'){scroll_pos=_get_scroll();titleHeight=$pbvt.height(),contentHeight=$pbv_pic_holder.height(),contentwidth=$pbv_pic_holder.width();projectedTop=(windowHeight/2)+scroll_pos['scrollTop']-(contentHeight/2);$pbv_pic_holder.css({'top':projectedTop,'left':(windowWidth/2)+scroll_pos['scrollLeft']-(contentwidth/2)});};};function _get_scroll(){if(self.pageYOffset){return{scrollTop:self.pageYOffset,scrollLeft:self.pageXOffset};}else if(document.documentElement&&document.documentElement.scrollTop){return{scrollTop:document.documentElement.scrollTop,scrollLeft:document.documentElement.scrollLeft};}else if(document.body){return{scrollTop:document.body.scrollTop,scrollLeft:document.body.scrollLeft};};};function _resize_overlay(){windowHeight=$(window).height(),windowWidth=$(window).width();if(typeof $pbv_overlay!="undefined")$pbv_overlay.height($(document).height());};function _insert_gallery(){settings=pbv_settings;if(isSet&&settings.overlay_gallery&&_getFileType(pbv_images[set_position])=="image"){itemWidth=52+5;navWidth=(settings.theme=="default")?58:38;itemsPerPage=Math.floor((correctSizes['containerWidth']-100-navWidth)/itemWidth);itemsPerPage=(itemsPerPage<pbv_images.length)?itemsPerPage:pbv_images.length;totalPage=Math.ceil(pbv_images.length/itemsPerPage)-1;if(totalPage==0){navWidth=0;$pbv_pic_holder.find('.pbv_gallery .pbv_arrow_next,.pbv_gallery .pbv_arrow_previous').hide();}else{$pbv_pic_holder.find('.pbv_gallery .pbv_arrow_next,.pbv_gallery .pbv_arrow_previous').show();};galleryWidth=itemsPerPage*itemWidth+navWidth;$pbv_pic_holder.find('.pbv_gallery').width(galleryWidth).css('margin-left',-(galleryWidth/2));$pbv_pic_holder.find('.pbv_gallery ul').width(itemsPerPage*itemWidth).find('li.selected').removeClass('selected');goToPage=(Math.floor(set_position/itemsPerPage)<=totalPage)?Math.floor(set_position/itemsPerPage):totalPage;if(itemsPerPage){$pbv_pic_holder.find('.pbv_gallery').hide().show().removeClass('disabled');}else{$pbv_pic_holder.find('.pbv_gallery').hide().addClass('disabled');}
$.pbvideosc.changeGalleryPage(goToPage);$pbv_pic_holder.find('.pbv_gallery ul li:eq('+set_position+')').addClass('selected');}else{$pbv_pic_holder.find('.pbv_content').unbind('mouseenter mouseleave');$pbv_pic_holder.find('.pbv_gallery').hide();}}
function _buildOverlay(caller){settings=pbv_settings;theRel=$(caller).attr('rel');galleryRegExp=/\[(?:.*)\]/;isSet=(galleryRegExp.exec(theRel))?true:false;pbv_images=(isSet)?jQuery.map(matchedObjects,function(n,i){if($(n).attr('rel').indexOf(theRel)!=-1)return $(n).attr('href');}):$.makeArray($(caller).attr('href'));pbv_titles=(isSet)?jQuery.map(matchedObjects,function(n,i){if($(n).attr('rel').indexOf(theRel)!=-1)return($(n).attr('title'))?$(n).attr('title'):"";}):$.makeArray($(caller).attr('title'));pbv_descriptions=(isSet)?jQuery.map(matchedObjects,function(n,i){if($(n).attr('rel').indexOf(theRel)!=-1)return($(n).attr('title'))?$(n).attr('title'):"";}):$.makeArray($(caller).attr('title'));$('body').append(settings.markup);$pbv_pic_holder=$('.pbv_pic_holder'),$pbvt=$('.pbvt'),$pbv_overlay=$('div.pbv_overlay');if(isSet&&settings.overlay_gallery){currentGalleryPage=0;toInject="";for(var i=0;i<pbv_images.length;i++){var regex=new RegExp("(.*?)\.(jpg|jpeg|png|gif)$");var results=regex.exec(pbv_images[i]);if(!results){classname='default';}else{classname='';}
toInject+="<li class='"+classname+"'><a href='#'><img src='"+pbv_images[i]+"' width='50' alt='' /></a></li>";};toInject=settings.gallery_markup.replace(/{gallery}/g,toInject);$pbv_pic_holder.find('#pbv_full_res').after(toInject);$pbv_pic_holder.find('.pbv_gallery .pbv_arrow_next').click(function(){$.pbvideosc.changeGalleryPage('next');$.pbvideosc.stopSlideshow();return false;});$pbv_pic_holder.find('.pbv_gallery .pbv_arrow_previous').click(function(){$.pbvideosc.changeGalleryPage('previous');$.pbvideosc.stopSlideshow();return false;});$pbv_pic_holder.find('.pbv_content').hover(function(){$pbv_pic_holder.find('.pbv_gallery:not(.disabled)').fadeIn();},function(){$pbv_pic_holder.find('.pbv_gallery:not(.disabled)').fadeOut();});itemWidth=52+5;$pbv_pic_holder.find('.pbv_gallery ul li').each(function(i){$(this).css({'position':'absolute','left':i*itemWidth});$(this).find('a').unbind('click').click(function(){$.pbvideosc.changePage(i);$.pbvideosc.stopSlideshow();return false;});});};if(settings.slideshow){$pbv_pic_holder.find('.pbv_nav').prepend('<a href="#" class="pbv_play">Play</a>')
$pbv_pic_holder.find('.pbv_nav .pbv_play').click(function(){$.pbvideosc.startSlideshow();return false;});}
$pbv_pic_holder.attr('class','pbv_pic_holder '+settings.theme);$pbv_overlay.css({'opacity':0,'height':$(document).height(),'width':$(document).width()}).bind('click',function(){settings=pbv_settings;if(!settings.modal)$.pbvideosc.close();});$('a.pbv_close').bind('click',function(){$.pbvideosc.close();return false;});$('a.pbv_expand').bind('click',function(e){if($(this).hasClass('pbv_expand')){$(this).removeClass('pbv_expand').addClass('pbv_contract');doresize=false;}else{$(this).removeClass('pbv_contract').addClass('pbv_expand');doresize=true;};_hideContent(function(){$.pbvideosc.open();});return false;});$pbv_pic_holder.find('.pbv_previous, .pbv_nav .pbv_arrow_previous').bind('click',function(){$.pbvideosc.changePage('previous');$.pbvideosc.stopSlideshow();return false;});$pbv_pic_holder.find('.pbv_next, .pbv_nav .pbv_arrow_next').bind('click',function(){$.pbvideosc.changePage('next');$.pbvideosc.stopSlideshow();return false;});_center_overlay();};return this.unbind('click').click($.pbvideosc.initialize);};function grab_param(name,url){name=name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");var regexS="[\\?&]"+name+"=([^&#]*)";var regex=new RegExp(regexS);var results=regex.exec(url);return(results==null)?"":results[1];}})(jQuery);;(function($){$.fn.superfish=function(op){var sf=$.fn.superfish,c=sf.c,$arrow=$(['<span class="',c.arrowClass,'"> &#xbb;</span>'].join("")),over=function(){var $$=$(this),menu=getMenu($$);clearTimeout(menu.sfTimer);$$.showSuperfishUl().siblings().hideSuperfishUl();},out=function(){var $$=$(this),menu=getMenu($$),o=sf.op;clearTimeout(menu.sfTimer);menu.sfTimer=setTimeout(function(){o.retainPath=($.inArray($$[0],o.$path)>-1);$$.hideSuperfishUl();if(o.$path.length&&$$.parents(["li.",o.hoverClass].join("")).length<1){over.call(o.$path);}},o.delay);},getMenu=function($menu){var menu=$menu.parents(["ul.",c.menuClass,":first"].join(""))[0];sf.op=sf.o[menu.serial];return menu;},addArrow=function($a){$a.addClass(c.anchorClass).append($arrow.clone());};return this.each(function(){var s=this.serial=sf.o.length;var o=$.extend({},sf.defaults,op);o.$path=$("li."+o.pathClass,this).slice(0,o.pathLevels).each(function(){$(this).addClass([o.hoverClass,c.bcClass].join(" ")).filter("li:has(ul)").removeClass(o.pathClass);});sf.o[s]=sf.op=o;$("li:has(ul)",this)[($.fn.hoverIntent&&!o.disableHI)?"hoverIntent":"hover"](over,out).each(function(){if(o.autoArrows){addArrow($(">a:first-child",this));}}).not("."+c.bcClass).hideSuperfishUl();var $a=$("a",this);$a.each(function(i){var $li=$a.eq(i).parents("li");$a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);});});o.onInit.call(this);}).each(function(){var menuClasses=[c.menuClass];if(sf.op.dropShadows&&!($.browser.msie&&$.browser.version<7)){menuClasses.push(c.shadowClass);}$(this).addClass(menuClasses.join(" "));});};var sf=$.fn.superfish;sf.o=[];sf.op={};sf.IE7fix=function(){var o=sf.op;if($.browser.msie&&$.browser.version>6&&o.dropShadows&&o.animation.opacity!=undefined){this.toggleClass(sf.c.shadowClass+"-off");}};sf.c={bcClass:"sf-breadcrumb",menuClass:"sf-js-enabled",anchorClass:"sf-with-ul",arrowClass:"sf-sub-indicator",shadowClass:"sf-shadow"};sf.defaults={hoverClass:"sfHover",pathClass:"overideThisToUse",pathLevels:1,delay:800,animation:{opacity:"show"},speed:"normal",autoArrows:true,dropShadows:true,disableHI:false,onInit:function(){},onBeforeShow:function(){},onShow:function(){},onHide:function(){}};$.fn.extend({hideSuperfishUl:function(){var o=sf.op,not=(o.retainPath===true)?o.$path:"";o.retainPath=false;var $ul=$(["li.",o.hoverClass].join(""),this).add(this).not(not).removeClass(o.hoverClass).find(">ul").hide().css("visibility","hidden");o.onHide.call($ul);return this;},showSuperfishUl:function(){var o=sf.op,sh=sf.c.shadowClass+"-off",$ul=this.addClass(o.hoverClass).find(">ul:hidden").css("visibility","visible");sf.IE7fix.call($ul);o.onBeforeShow.call($ul);$ul.animate(o.animation,o.speed,function(){sf.IE7fix.call($ul);o.onShow.call($ul);});return this;}});})(jQuery);jQuery(document).ready(function($){$('#navbar-1 ul.superfish, #navbar-2 ul.superfish').superfish({delay:100,animation:{opacity:'show',height:'show'},dropShadows:false});});;(function($){var c=document.getElementsByTagName('html')[0];c.className+=' social-js';$(function(){var $window=null;var $auth_window=null;var auth_poll=null;$('.social-login').click(function(e){e.preventDefault();$window=$(this);$auth_window=window.open($(this).attr('href'),"ServiceAssociate",'width=700,height=400');auth_poll=setInterval(function(){if($auth_window.closed){clearInterval(auth_poll);if(!$window.hasClass('comments')){window.location.reload();}
else{var $parent=$('.social-post');$.post($parent.find('#reload_url').val(),{},function(response){if(response.result=='success'){$('body').addClass('logged-in');var $cancel=$('#cancel-comment-reply-link');var $parent=$cancel.closest('li');$cancel.click();$('#respond').replaceWith(response.html);$parent.find('.comment-reply-link').click();$('#primary').find('#social_login').parent().html(response.disconnect_url);}},'json');$('#cancel-comment-reply-link').live('click',function(){jQuery('.comment-reply-link').show();});}}},100);});if($('#social').length){var $prevLink=null;var prevLink=null;var $nextLink=null;var nextLink=null;if($('#comments .nav-previous a').length){$prevLink=$('#comments .nav-previous a');prevLink=$prevLink.attr('href');}
if($('#comments .nav-next a').length){$nextLink=$('#comments .nav-next a');nextLink=$nextLink.attr('href');}
$('.social-nav a').click(function(e){e.preventDefault();$('#cancel-comment-reply-link').trigger('click');$('.social-current-tab').removeClass('social-current-tab');$(this).parent().addClass('social-current-tab');$('.social-items').removeClass('social-comment-collapse');var className=$(this).attr('rel');if(className=='social-all'){if(nextLink!==null){$nextLink.attr('href',nextLink);}
if(prevLink!==null){$prevLink.attr('href',prevLink);}
$('.social-commentlist li').removeClass('social-comment-collapse');}else{$('.social-items:not(.'+className+')').addClass('social-comment-collapse');$('.social-commentlist li').each(function(){if(!$(this).hasClass(className)){$(this).addClass('social-comment-collapse');}
else{$(this).removeClass('social-comment-collapse');}});if(prevLink!==null){var _prevLink=prevLink.split('#comments');if(_prevLink.indexOf('?')==-1){_prevLink[0]=_prevLink[0]+'?';}
else{_prevLink[0]=_prevLink[0]+'&';}
$prevLink.attr('href',_prevLink[0]+'social_tab='+className+'#comments');}
if(nextLink!==null){var _nextLink=nextLink.split('#comments');if(_nextLink.indexOf('?')==-1){_nextLink[0]=_nextLink[0]+'?';}
else{_nextLink[0]=_nextLink[0]+'&';}
$nextLink.attr('href',_nextLink[0]+'social_tab='+className+'#comments');}}});$('.social-current-tab a').trigger('click');function insertTwitterUsername($author,$textarea,extraContent){var username=$author.html()+' ';if(username.substr(0,1)!='@'){username='@'+username;}
if(extraContent!==undefined){username+=extraContent;}
var pos=username.length;$textarea.val(username);if($textarea.get(0).setSelectionRange){$textarea.focus();$textarea.get(0).setSelectionRange(pos,pos);}else if($textarea.createTextRange){var range=$textarea.get(0).createTextRange();range.collapse(true);range.moveEnd('character',pos);range.moveStart('character',pos);range.select();}
var author_rel=$author.attr('rel').split(' ');$('#in_reply_to_status_id').val(author_rel[0]);}
var $use_twitter_reply=$('#use_twitter_reply');$('.comment-reply-link').click(function(){$('.comment-reply-link').show();$(this).hide();var $parent=$(this).closest('li');var $textarea=$parent.find('textarea');if($parent.hasClass('social-twitter')&&$use_twitter_reply.val()=='1'){var $author=$parent.find('.social-comment-author a');insertTwitterUsername($respond.closest('li').find('.social-comment-author a'),$textarea);}});$('#cancel-comment-reply-link').click(function(){$('.comment-reply-link').show();});var $avatar=$('#commentform .avatar');var original_avatar=$avatar.attr('src');$('#post_accounts').live('change',function(){$(this).find('option:selected').each(function(){var avatar=$(this).attr('rel');if(avatar!==undefined){$avatar.attr('src',avatar);}else{$avatar.attr('src',original_avatar);}
var label=$(this).parent().attr('label');if(label!==undefined){$('#post_to').show().find('span').html(label);if(label==='Twitter'){var $respond=$('#respond');var $textarea=$respond.find('textarea');if($respond.parent().hasClass('social-twitter')){var content=$textarea.val();if(!content.length||content.substring(0,1)!='@'){insertTwitterUsername($respond.closest('li').find('.social-comment-author a'),$textarea,content);}}
$use_twitter_reply.val('1');}else{$use_twitter_reply.val('0');}}else{$('#post_to').hide();}});});$('#post_accounts').trigger('change');}
var $social_comments_adminbar_item=$('#wp-admin-bar-social_find_comments');if($social_comments_adminbar_item.size()){var $social_spinner=$social_comments_adminbar_item.find('.social-aggregation-spinner');var $social_aggregation=$('#social_aggregation');var $comment_adminbar_item=$('#wp-admin-bar-comments');$social_aggregation.click(function(e){if($(this).attr('href')=='#'){e.preventDefault();}}).removeClass('running-aggregation');$comment_adminbar_item.removeClass('running-aggregation');$social_comments_adminbar_item.find('a').click(function(e){e.preventDefault();if(!$comment_adminbar_item.hasClass('running-aggregation')){$comment_adminbar_item.addClass('running-aggregation');$('#wp-adminbar-comments-social').animate({width:'0'},function(){$(this).remove();});$comment_adminbar_item.find('#ab-awaiting-mod').hide().end().find('a:first').append($social_spinner);$social_spinner.show();SocialLoadingInterval=setInterval(function(){var next=false;var $dots=jQuery('.social-aggregation-spinner').find('.social-dot');$dots.each(function(){var active=jQuery(this).hasClass('dot-active');if(next){jQuery(this).addClass('dot-active');}
if(active){jQuery(this).removeClass('dot-active');next=true;}
else{next=false;}});if($dots.filter('.dot-active').size()==0){$dots.filter(':first').addClass('dot-active');}},425);$.get($(this).attr('href'),{render:'false'},function(response){$social_spinner.hide();$social_comments_adminbar_item.append($social_spinner);clearInterval(SocialLoadingInterval);$comment_adminbar_item.find('#ab-awaiting-mod').html(response.total).show();$comment_adminbar_item.addClass('social-comments-found').after(response.html);var $social_comments_found=$('#wp-adminbar-comments-social');var found_width=$social_comments_found.width();$social_comments_found.css({position:'relative',visibility:'visible',width:0}).animate({width:found_width+'px'});$social_aggregation.attr('href',response.link);$comment_adminbar_item.removeClass('running-aggregation');},'json');}});}
if(typeof twttr!='undefined'){twttr.anywhere(function(T){T.hovercards();});}
if($('.social-items-and-more').length){$('.social-items-and-more').click(function(e){e.preventDefault();$(this).parent().find('a').show();$(this).hide();});}});})(jQuery);
