
jQuery(document).ready(function(){if(jQuery('.sidebar-testimonials').length>0){well_cycle();}
well_faq();well_portfolio();well_dd_menu();well_tweets(3,"MarkDijkstra");well_animate();well_login();well_gmaps();well_scroll_top();if(jQuery('.50Slider').length>0){well_50_slider();}
if(jQuery('#piecemaker').length>0){well_piecemaker();}
if(jQuery('.nivoSlider').length>0){well_nivo_slider();}
if(jQuery('.coinSlider').length>0){well_coin_slider();}
well_lightbox();$(".preload_all, .kwicksSlider").img_preloader({delay:200});});function well_piecemaker(){var flashvars={};flashvars.cssSource="css/piecemaker.css";flashvars.xmlSource="piecemaker.xml";var params={};params.play="true";params.menu="false";params.scale="showall";params.wmode="transparent";params.allowfullscreen="true";params.allowscriptaccess="always";params.allownetworking="all";swfobject.embedSWF('piecemaker.swf','piecemaker','960','480','1',null,flashvars,params,null);}
function well_coin_slider(){jQuery('#header-slider-inner').hide(1);setTimeout(function(){jQuery('#header-slider-inner, .cs-buttons').fadeIn(400);},500);$('.coinSlider').coinslider({width:958,height:398,spw:7,sph:5,delay:3000,sDelay:30,opacity:0.7,titleSpeed:500,effect:'random',navigation:true,links:true,hoverPause:true});}
function well_50_slider(){jQuery('.slide50 img').hide(1);setTimeout(function(){jQuery('.slide50 img').fadeIn(400);},500);jQuery('.50Slider').cycle({fx:'fade',timeout:5000,speed:200,pause:true,cleartype:!$.support.opacity,cleartypeNoBg:true,pager:'#nav50'});}
function well_cycle(){jQuery('.sidebar-testimonials').cycle({fx:'fade',speed:500,timeout:5000});}
function well_portfolio(){jQuery(".jcap-caption").hover(function(){img_wdt=jQuery('.jcap').width()-40;img_hgt=jQuery('.jcap').height()-40;jQuery(this).css({backgroundImage:"none"}).stop(true,true).animate({height:img_hgt,width:img_wdt},300).children('div').stop(true,true).delay(200).fadeIn(1);},function(){jQuery(this).delay(100).css({backgroundImage:""}).animate({height:'10px',width:'10px'},300).children('div').hide(10);});}
function well_faq(){jQuery("a.faqa").toggle(function(){jQuery(this).next('p').slideDown(100);jQuery(this).prev('span').removeClass('plus').addClass('min');},function(){jQuery(this).next('p').slideUp(100);jQuery(this).prev('span').removeClass('min').addClass('plus');});}
function well_equalHeight(group){tallest=0;group.each(function(){thisHeight=jQuery(this).height();if(thisHeight>tallest){tallest=thisHeight;}});group.height(tallest);}
function well_gmaps(){$('#sidebar-maps').googleMaps({latitude:42.351505,longitude:-71.094455,markers:{latitude:42.351505,longitude:-71.094455,draggable:true,info:{layer:'#ginfo'}}});}
function well_dd_menu(){jQuery("ul#header-menu li").hover(function(){jQuery(this).stop().find('ul:first').css({visibility:"visible",display:"none"}).animate({height:'toggle'},200);},function(){jQuery('ul:first',this).css('visibility','hidden');});jQuery('.second-lvl').parent("li").addClass('arrowdown');jQuery('.third-lvl').parent("li").addClass('arrowright');jQuery(".second-lvl").hover(function(){jQuery(this).parent("li").addClass("active");},function(){jQuery(this).parent("li").removeClass("active");});}
function well_animate(){jQuery(".content-3col .readmore").hover(function(){jQuery(this).stop().animate({width:"156px"},150);},function(){jQuery(this).stop().animate({width:"62px"},150);});}
function well_login(){jQuery.fn.center=function(absolute){return this.each(function(){var t=jQuery(this);t.css({position:absolute?'absolute':'fixed',left:'50%',top:'50%'}).css({marginLeft:'-'+(t.outerWidth()/2)+'px',marginTop:'-'+(t.outerHeight()/2)+'px'});if(absolute){t.css({marginTop:parseInt(t.css('marginTop'),10)+jQuery(window).scrollTop(),marginLeft:parseInt(t.css('marginLeft'),10)+jQuery(window).scrollLeft()});}});};jQuery("#login-box").center();jQuery("#login, .login-top").click(function(){jQuery('body').append('<div id="overlay" />');jQuery('#overlay').fadeTo('fast',0.3);jQuery("#login-box").stop().fadeIn();});jQuery("#login-close").click(function(){jQuery('#overlay').fadeOut();jQuery("#login-box").fadeOut();});}
function well_nivo_slider(){jQuery('#header-slider-inner').hide(1);setTimeout(function(){jQuery('#header-slider-inner').fadeIn(400);},500);jQuery('#header-slider-inner').nivoSlider({effect:'random',slices:15,animSpeed:600,pauseTime:6000,directionNav:true,directionNavHide:true,controlNav:true,keyboardNav:true,pauseOnHover:true,manualAdvance:false,captionOpacity:0.8,beforeChange:function(){},afterChange:function(){},slideshowEnd:function(){}});}
function well_lightbox(){jQuery().piroBox({my_speed:300,bg_alpha:0.3,slideShow:true,slideSpeed:4,close_all:'.piro_close, .piro_overlay'});jQuery(".pirobox, .pirobox_portfolio, .pirobox_gallery").hover(function(){jQuery(this).find("img").stop().fadeTo("fast",0.7);jQuery(this).append('<span class="lightbox-tip" ></span>');},function(){jQuery(this).find("img").stop().fadeTo("fast",1.0);jQuery("span.lightbox-tip").fadeOut(200);});jQuery('div.gallery-box, a.blog-img, a.portfolio-img, .imgwrap-theme').hover(function(){jQuery(this).css({backgroundImage:"none"});});if(jQuery.browser.msie){jQuery(".shadow-140, .shadow-225, .shadow-240, .shadow-300, .shadow-460, .shadow-450, .shadow-620, .shadow-960").show(1);}else{jQuery(".shadow-140, .shadow-225, .shadow-240, .shadow-300, .shadow-460, .shadow-450, .shadow-620, .shadow-960").delay(1000).fadeIn(1000);}}
function well_tweets(tws,username){getTwitters('sidebar-tweets',{id:username,clearContents:false,count:tws,timeout:200,withFriends:true,ignoreReplies:false,newwindow:true,template:'<a href="http://twitter.com/%screen_name%">%user_screen_name%</a> said: "%text%" - <span>%time%</span>'});}
function well_scroll_top(){jQuery('#top').click(function(){jQuery('html, body').animate({scrollTop:0},'slow');});}
function well_switch_view(){jQuery("a.switch_thumb").toggle(function(){jQuery(this).addClass("swap");jQuery("ul.display").fadeOut("fast",function(){jQuery(this).fadeIn("fast").removeClass("display").addClass("thumb_view");});},function(){jQuery(this).removeClass("swap");jQuery("ul.thumb_view").fadeOut("fast",function(){jQuery(this).fadeIn("fast").addClass("display").removeClass("thumb_view");});});}
