/*-----------------------------------------------------------------------------------*/ /* Preloader & Initialize Masonry Script /*-----------------------------------------------------------------------------------*/ // Set jQuery to NoConflict Mode jQuery.noConflict(); jQuery(document).ready(function($){ $('#container').masonry({ //Call masonry plugin once loaded itemSelector : '.item', columnWidth : 220, isAnimated: !Modernizr.csstransitions }); }); /***********Load Individual Slides***************/ jQuery(".attachment-portfoliosmall").bind("load", function ($) { jQuery(this).css('visibility','visible').hide().fadeIn('slow', function() { jQuery(this).parent(".portfoliopreload").css("background", "none"); }); }).each(function($) { if(this.complete) { jQuery(this).css('visibility','visible').hide().fadeIn('slow', function() { jQuery(this).parent(".portfoliopreload").css("background", "none"); }); } }); /***********Load Individual Slides***************/ jQuery(".largeport").bind("load", function ($) { jQuery(this).css('visibility','visible').hide().fadeIn('slow', function() { jQuery(this).parent(".videocontainer").css("background", "none"); }); }).each(function($) { if(this.complete) { jQuery(this).css('visibility','visible').hide().fadeIn('slow', function() { jQuery(this).parent(".videocontainer").css("background", "none"); }); } }); (function($){ //Self Invoking Anonymous Function $(window).load(function(){ /*** Fix IE Stuff ***/ $(".largeport").css('visibility','visible').hide().fadeIn('slow', function () { $(".videocontainer").delay(700).css("background", "none"); }); }); })(jQuery); /*-----------------------------------------------------------------------------------*/ /* Superfish Initialization /*-----------------------------------------------------------------------------------*/ jQuery(function($) { $('ul.sf-menu').superfish({ autoArrows: true }); }); /*-----------------------------------------------------------------------------------*/ /* Tabs /*-----------------------------------------------------------------------------------*/ if(jQuery() .tabs) { jQuery( "#tabs" ).tabs().addClass( "ui-tabs-vertical ui-helper-clearfix" ); jQuery( "#tabs li" ).removeClass( "ui-corner-top" ).addClass( "ui-corner-left" ); jQuery( "#tabs" ).tabs({ fx: { opacity: 'toggle' } }); }; /*-----------------------------------------------------------------------------------*/ /* Pretty Photo /*-----------------------------------------------------------------------------------*/ jQuery(function($){ $("a[rel^='prettyPhoto']").prettyPhoto({ animation_speed: 'fast', /* fast/slow/normal */ slideshow: 5000, /* false OR interval time in ms */ autoplay_slideshow: false, /* true/false */ opacity: 0.80, /* Value between 0 and 1 */ show_title: false, /* true/false */ allow_resize: true, /* Resize the photos bigger than viewport. true/false */ default_width: 880, default_height: 344, counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */ theme: 'pp_default', /* light_rounded / dark_rounded / light_square / dark_square / facebook */ horizontal_padding: 20, /* The padding on each side of the picture */ hideflash: false, /* Hides all the flash object on a page, set to TRUE if flash appears over prettyPhoto */ wmode: 'opaque', /* Set the flash wmode attribute */ autoplay: true, /* Automatically start videos: True/False */ modal: false, /* If set to true, only the close button will close the window */ deeplinking: true, /* Allow prettyPhoto to update the url to enable deeplinking. */ overlay_gallery: true, /* If set to true, a gallery will overlay the fullscreen image on mouse over */ keyboard_shortcuts: true, /* Set to false if you open forms inside prettyPhoto */ changepicturecallback: function(){}, /* Called everytime an item is shown/changed */ callback: function(){}, /* Called when prettyPhoto is closed */ ie6_fallback: true }); }); /*-----------------------------------------------------------------------------------*/ /* Hover Effects /*-----------------------------------------------------------------------------------*/ function hover_overlay() { jQuery('.postphoto img, .hover img, .lightboxhover img').hover( function() { jQuery(this).stop().animate({opacity : 0.2}, 500); }, function() { jQuery(this).stop().animate({opacity : 1}, 500); }); } hover_overlay(); function hover_overlay_slide() { jQuery('.video').hover( function() { jQuery(this).stop().animate({opacity : 1}, 100); }, function() { jQuery(this).stop().animate({opacity : .9}, 100); }); } hover_overlay_slide(); /*-----------------------------------------------------------------------------------*/ /* Custom Masonry Reaction Script by Andre Gagnon /*-----------------------------------------------------------------------------------*/ var switcher = 'Z'; // Set a variable to say that no boxes are open var larghezza = '640px'; function changer(letter, postid, height){ var el = document.getElementById('itemdiv'+letter); if ( hasClass(el, 'long')){ var larghezza ='860px'; } else {larghezza = '640px';} if (switcher == 'Z') { //If no boxes are open document.getElementById('itemdiv'+letter).style.width = larghezza; document.getElementById('arrow'+letter).style.display ='inline'; //flash item div width and hieght for masonry $textHeight = jQuery('#arrow' +letter).children('.portfoliocontent').height(); //get the height of the text $divheight=Number($textHeight) + Number(height) + 60; //add text height to maximum image height + toggle buttons jQuery('#arrow' + letter).height($divheight); //Set div height before masonry jQuery('#container').masonry({ itemSelector : '.item', columnWidth : 220, isAnimated: !Modernizr.csstransitions}); document.getElementById('itemdiv'+letter).style.width =larghezza; // document.getElementById('arrow'+letter).style.display ='none'; //display:none; so we can fade in. jQuery('#arrow' + letter).delay(200).show(); // Fade in the project switcher = letter; // Tell the switcher that a box is open } else { document.getElementById(switcher).height ='200'; //change height of open image (before masonry) document.getElementById(switcher).width ='200';//change width of open image (before masonry) document.getElementById('itemdiv'+switcher).style.width ='200px'; //Change width of open container (before masonry) jQuery('#arrow' + switcher).hide(0, function(){ //fade out open content container /* After Fadeout Open Box*/ document.getElementById('itemdiv'+letter).style.width = larghezza; //Change width of clicked on container after fade out document.getElementById('arrow'+letter).style.display ='inline'; //flash the clicked-on div width and hieght for masonry $textHeight = jQuery('#arrow' +letter).children('.portfoliocontent').height(); $divheight=Number($textHeight) + Number(height) + 60; jQuery('#arrow' + letter).height($divheight); jQuery('#container').masonry({ itemSelector : '.item', columnWidth : 220, isAnimated: !Modernizr.csstransitions}); //run masonry document.getElementById('arrow'+letter).style.display ='none'; //display none jQuery('#arrow' + letter).delay(600).show(); // fade in new div after .6 seconds /* After Fadeout Open Box*/ }); switcher = letter; //Let the function know a box is open //Scroll window to the div box } } function xout(letter, postid) { document.getElementById(letter).height ='200'; document.getElementById(letter).width ='200'; document.getElementById(switcher).style.display ='inline'; document.getElementById('itemdiv'+letter).style.width ='200px'; jQuery('#arrow' + letter).fadeOut('fast', function() { jQuery('#container').masonry({ itemSelector : '.item', columnWidth : 220, isAnimated: !Modernizr.csstransitions}); switcher = 'Z'; //Let the function know that no windows are open }); } onComplete = function() { alert('doing it'); } function hasClass(element, cls) { return (' ' + element.className + ' ').indexOf(' ' + cls + ' ') > -1; } /*-----------------------------------------------------------------------------------*/ /* Portfolio Mini Cycle Slideshow /*-----------------------------------------------------------------------------------*/ jQuery(document).ready(function($) { $('.pics').each(function() { var $nav = $('
').insertAfter(this); var $this = $(this); $this.cycle({ speed: 300, timeout:0, pager: $nav, pauseOnPagerHover: true, fx: 'fade', pause: true, pagerAnchorBuilder: function(idx, slide) { return '