
jQuery(document).ready(function(){
    if(jQuery('.sidebar-testimonials').length>0){avio_cycle();}
avio_portfolio();
avio_animate();
avio_login();
avio_scroll_top();
if(jQuery('.50Slider').length>0){avio_50_slider();}
if(jQuery('#piecemaker').length>0){avio_piecemaker();}
if(jQuery('.nivoSlider').length>0){avio_nivo_slider();}
if(jQuery('.coinSlider').length>0){avio_coin_slider();}
avio_lightbox();jQuery(".preload_all, .kwicksSlider").img_preloader({delay:200});});
function avio_50_slider(){jQuery('.slide50 img').hide(1);setTimeout(function(){jQuery('.slide50 img').fadeIn(200);},500);jQuery('.50Slider').cycle({fx:'fade',timeout:5000,speed:200,pause:true,cleartype:!$.support.opacity,cleartypeNoBg:true,pager:'#nav50'});}
function avio_cycle(){jQuery('.sidebar-testimonials').cycle({fx:'fade',speed:500,timeout:5000});}
function avio_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 avio_equalHeight(group){tallest=0;group.each(function(){thisHeight=jQuery(this).height();if(thisHeight>tallest){tallest=thisHeight;}});group.height(tallest);}
function avio_animate(){jQuery(".content-3col .readmore").hover(function(){jQuery(this).stop().animate({width:"156px"},150);},function(){jQuery(this).stop().animate({width:"62px"},150);});}
function avio_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 avio_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 avio_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('');},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 avio_scroll_top(){jQuery('#top').click(function(){jQuery('html, body').animate({scrollTop:0},'slow');});}
function avio_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");});});}
