jQuery(document).ready(function($) { $('.VerticalGalleryThumbs .panel').jScrollPane(); $('.BigGalleryThumbsSlide li').jScrollPane(); $('.VerticalGalleryThumbs').hover(function() { $(".jspDrag").animate({opacity: 1}, 200); }).mouseleave(function(){ $(".jspDrag").animate({opacity: 0}, 200); }); $("a.pic").fancybox({ 'titleShow' : false, 'transitionIn' : 'fade', 'transitionOut' : 'fade' }); $("a.video").click(function(){ $.fancybox({ 'titleShow' : false, 'transitionIn' : 'fade', 'transitionOut' : 'fade', 'href' : this.href = this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'), 'type' : 'iframe', 'swf' : {'wmode':'transparent','allowfullscreen':'true'} }); return false; }); $(".open-nwl").fancybox({ 'modal' : true, 'padding' : 0, 'margin' : 0, 'width' : 350, 'height' : 250, 'overlayOpacity': 0.5, 'overlayColor' : '#fff', 'hideOnOverlayClick' : true, 'enableEscapeButton' : true, 'showCloseButton' : true, 'onComplete' : function() { $("#nwlwindow").parent().parent().parent("#fancybox-outer").addClass("fbnwl"); } }); $(".closewindow").click(function() { jQuery.fancybox.close(); return false; }); $(".search").click(function() { if ($("#big-search-window").css("display") == 'none') { $(this).addClass("sclose"); $("#big-search-window").fadeIn(200); } else { $(this).removeClass("sclose"); $("#big-search-window").fadeOut(200); } }); $('.sktooltip').each(function() { $(this).SKTooltip(); }); $('.sk-notification').each(function() { $(this).closeNotification(); }); $('.skimage-slider').each(function() { $(this).skImageSlider(); }); $('.sktoggle-open, .sktoggle-closed').each(function() { $(this).skToggle(); }); $('.sktabbed').each(function() { $(this).skTabbed(); }); $("a img").not("a.ne img, a img.image_main").mouseover(function() { $(this).animate({opacity: 0.5}, 200); }).mouseout(function() { $(this).animate({opacity: 1}, 200); }); $(".socials a").mouseover(function() { $(this).animate({opacity: 0.4}, 200); }).mouseout(function() { $(this).animate({opacity: 1}, 200); }); /* $(".sidebar_item .thumbnail img").mouseover(function() { $(this).parent("a").animate({backgroundColor: '#141924'}, 200); }).mouseout(function() { $(this).parent("a").animate({backgroundColor: '#FFFFFF'}, 200); }); */ $("a.thumbnail span, .blog-pic span").mouseover(function() { $(this).animate({opacity: 1}, 200); }).mouseout(function() { $(this).animate({opacity: 0}, 200); }); $(".BigGalleryThumbs a span").mouseover(function() { if(!$(this).parent("a").hasClass("active")) { $(this).animate({opacity: 1}, 200); } }).mouseout(function() { if(!$(this).parent("a").hasClass("active")) { $(this).animate({opacity: 0}, 200); } }); $(".BigGalleryThumbs a").click(function() { $(".BigGalleryThumbs a").removeClass("active"); $(".BigGalleryThumbs a span").css({opacity: 0}); $(this).addClass("active"); $(this).children("span").css({opacity: 1}); }); $(".VerticalGalleryThumbs a").click(function() { $(".VerticalGalleryThumbs a").removeClass("active"); $(".VerticalGalleryThumbs a span").css({opacity: 0}); $(this).addClass("active"); $(this).children("span").css({opacity: 1}); }); $(".BigGalleryThumbsSlide a").click(function() { $(".BigGalleryThumbsSlide a").removeClass("active"); $(".BigGalleryThumbsSlide a span").css({opacity: 0}); $(this).addClass("active"); $(this).children("span").css({opacity: 1}); }); /* gallery */ $(".vendor").mouseover(function() { if (!$(this).hasClass("inactive")) { $(this).children(".shadow").children(".vthumb").children("span").animate({opacity: 1}, 200); $(this).children("span").children(".v-title").animate({color: '#dd607d'}, 200); } }).mouseleave(function() { $(this).children(".shadow").children(".vthumb").children("span").animate({opacity: 0}, 200); $(this).children("span").children(".v-title").animate({color: '#ff9194'}, 200); }); /* $(".gallery-cats").children("li").children("a").click(function() { $(".gallery-cats").children("li").children("a").removeClass("active"); $(this).addClass("active"); var t = $(this).attr("href").substr(1); $(".vendor").each(function() { if ($(this).hasClass(t)) { $(this).animate({opacity: 1}, 400).removeClass("inactive"); } else { $(this).animate({opacity: 0.2}, 400).addClass("inactive"); } }); });*/ $("a.footer-item").mouseover(function() { if ($(this).hasClass("first")) { mleft = -11; } else { mleft = 22; } $(this).children(".container").animate({marginLeft: -11, marginTop: -11}, 100); $(this).animate({paddingLeft: 11, paddingTop: 11, marginLeft: mleft, marginTop: -11}, 100); }).mouseleave(function() { if ($(this).hasClass("first")) { mleft = 0; } else { mleft = 33; } $(this).children(".container").animate({marginLeft: 0, marginTop: 0}, 100); $(this).animate({paddingLeft: 0, paddingTop: 0, marginLeft: mleft, marginTop: 0}, 100); }); $(".r-article").mouseover(function() { $(this).animate({marginTop: -11}, 100); }).mouseleave(function() { $(this).animate({marginTop: 0}, 100); }); /* $("a.r-thumb img").mouseover(function() { $(this).parent("a").children(".r-thumb-pic").children(".hover").animate({opacity: 1}, 200); $(this).parent("a").parent(".r-article").children("h2").children("a").animate({color: "#8bcbdd"}, 200); }).mouseout(function() { $(this).parent("a").children(".r-thumb-pic").children(".hover").animate({opacity: 0}, 200); $(this).parent("a").parent(".r-article").children("h2").children("a").animate({color: "#666767"}, 200); }); */ $("a.f-thumbnail").mouseover(function() { $(this).children(".bg").animate({opacity: 1}, 300); }).mouseleave(function() { $(this).children(".bg").animate({opacity: 0}, 300); }); /*$(".button").mouseover(function() { $(this).clearQueue(); $(this).animate({boxShadow: '0 0 3px #00b4ff'}, 200); }).mouseout(function() { $(this).clearQueue(); $(this).animate({boxShadow: '0 0 0 #FFF'}, 200); });*/ $('a.toplink').click(function () { $('body,html').animate({ scrollTop: 0 }, 800); return false; }); $(".tab_button").click(function() { var sname = $(this).attr("id"); $(this).parent("div").children(".tab_button").removeClass("active"); $(this).addClass("active"); return false; }); var artmax = 0; $("#tags_widget").children("ul").children("li").each(function() { var artnr = parseInt($(this).attr("title")); if (artnr > artmax) { artmax = artnr; } }); $("#tags_widget").children("ul").children("li").each(function() { var artnr = parseInt($(this).attr("title")); var backgroundpos = -280+parseInt((280/artmax)*artnr); $(this).children().css({backgroundPosition: backgroundpos + "px top"}); }); $("#tags_widget").children("ul").children("li").mouseover(function() { $(this).children().clearQueue(); $(this).children().animate({borderColor: '#C6C6BF'}, 200, 'swing'); }).mouseout(function() { $(this).children().clearQueue(); $(this).children().animate({borderColor: '#EFEFEF'}, 200, 'swing'); }); $("#MainMenu").children("li").each(function() { if ($(this).children("div").children("ul").hasClass("sub-menu")) { $(this).addClass("dd"); } }); $("#MainMenu").children("li").children("div").children("ul").children("li").each(function() { if ($(this).children("div").children("ul").hasClass("sub-menu")) { $(this).addClass("dd"); } }); /* $("#MainMenu").children("li").children("div").children("ul").children("li").each(function() { if ($(this).children("div").children("ul").hasClass("sub-menu")) { var w = parseInt($(this).parent("ul").parent("div").width())-20; if($.browser.mozilla) { w = w+4; } $(this).children(".sm").css({marginLeft: w, marginTop: '-44px'}); } });*/ $("#MainMenu li, #MainMenu li div ul li").hover( function() { $(this).addClass("hover"); if ($(this).hasClass("active") == true) { $(this).removeClass('active').addClass('a'); } $(this).children(".sm").clearQueue(); $(this).children(".sm").css({zIndex: 99, height: 'auto'}); $(this).children(".sm").slideDown(700, "easeInOutExpo"); }, function() { if ($(this).hasClass("dd") == false) { $(this).removeClass('hover'); } $(this).children(".sm").clearQueue(); $(this).children(".sm").css({zIndex: 98}); $(this).children(".sm").slideUp(400, "easeInOutExpo", function() { $(this).parent("li").removeClass('hover'); if ($(this).parent("li").hasClass("a") == true) { $(this).parent("li").removeClass('a').addClass('active'); } }); }); /* $("#vendors-dd").hover(function() { $(this).addClass("on"); }, function() { $("#vendors-dd").slideUp(400, "easeInOutExpo", function() { $("#navigation li.vendorscategoriesmenu").removeClass('on'); }); });*/ // vendors drop down $("#navigation li.vendorscategoriesmenu").hover(function() { var mpos = $(this).offset(); var mposleft = parseInt(mpos.left); var mpostop = parseInt(mpos.top); $(this).addClass("hover"); $("#vendors-dd").css({left: mposleft, top: mpostop}); $("#vendors-dd").slideDown(700, "easeInOutExpo"); }); $("#header-wrapper, #content").hover(function() { $("#vendors-dd").slideUp(400, "easeInOutExpo", function() { $("#navigation li.vendorscategoriesmenu").removeClass("hover"); }); }); // photo gallery $(".thumb").click(function() { $(".thumb").removeClass("active"); $(this).addClass("active"); var nr = $(this).children("a").attr("id").replace("t", ""); $(".main-pic").children(".active").fadeOut(1500, "easeInQuart"); $("#gp"+nr).fadeIn(1500, "easeOutCubic"); $(".main-pic").children(".active").removeClass("active"); $("#gp"+nr).addClass("active"); return false; }); $(".pichidden").hover(function() { var t = 0-parseInt($(this).children("div").height())-parseInt($(this).children("div").css("paddingTop"))-parseInt($(this).children("div").css("paddingBottom")); $(this).children("div").clearQueue(); $(this).children("div").animate({marginTop: t}, 300); },function(){ $(this).children("div").clearQueue(); $(this).children("div").animate({marginTop: 0}, 300); }); $("#recover").click(function() { $("#recoverbox").css({display: 'block'}); $("#loginbox").css({display: 'none'}); }); $("#login").click(function() { $("#recoverbox").css({display: 'none'}); $("#loginbox").css({display: 'block'}); }); // responsive starts here var HSMXNR = $('#HomepageSliderMob').children("li").size(); var HSM = 1; $('#HomepageSliderMob').wipetouch({ wipeLeft: function(result) { if (HSM < HSMXNR) { HSM = HSM+1; $('#HomepageSliderMob').anythingSlider(HSM); } }, wipeRight: function(result) { if (HSM > 1) { HSM = HSM-1; $('#HomepageSliderMob').anythingSlider(HSM); } }, }); var HBSMXNR = $('#HomepageBlogSlider').children("li").size(); var HBSM = 1; $('#HomepageBlogSlider').wipetouch({ wipeLeft: function(result) { if (HBSM < HBSMXNR) { HBSM = HBSM+1; $('#HomepageBlogSlider').anythingSlider(HBSM); } }, wipeRight: function(result) { if (HBSM > 1) { HBSM = HBSM-1; $('#HomepageBlogSlider').anythingSlider(HBSM); } }, }); var BSMXNR = $('#BlogSlider').children("li").size(); var BSM = 1; $('#BlogSlider').wipetouch({ wipeLeft: function(result) { if (BSM < BSMXNR) { BSM = BSM+1; $('#BlogSlider').anythingSlider(BSM); } }, wipeRight: function(result) { if (BSM > 1) { BSM = BSM-1; $('#BlogSlider').anythingSlider(BSM); } }, }); var TSMXNR = $('#Testimonials').children("li").size(); var TSM = 1; $('#Testimonials').wipetouch({ wipeLeft: function(result) { if (TSM < TSMXNR) { TSM = TSM+1; $('#Testimonials').anythingSlider(TSM); } }, wipeRight: function(result) { if (TSM > 1) { TSM = TSM-1; $('#Testimonials').anythingSlider(TSM); } }, }); var BGMXNR = $('.BigGallery').children("li").size(); var BGM = 1; $('.BigGallery').wipetouch({ wipeLeft: function(result) { if (BGM < BGMXNR) { BGM = BGM+1; $('.BigGallery').anythingSlider(BGM); } }, wipeRight: function(result) { if (BGM > 1) { BGM = BGM-1; $('.BigGallery').anythingSlider(BGM); } }, }); var VGMXNR = $('.VerticalGallery').children("li").size(); var VGM = 1; $('.VerticalGallery').wipetouch({ wipeLeft: function(result) { if (VGM < VGMXNR) { VGM = VGM+1; $('.VerticalGallery').anythingSlider(VGM); } }, wipeRight: function(result) { if (VGM > 1) { VGM = VGM-1; $('.VerticalGallery').anythingSlider(VGM); } }, }); var SCSNR = $('.SCSlider').children("li").size(); var SCS = 1; $('.SCSlider').wipetouch({ wipeLeft: function(result) { if (SCS < SCSNR) { SCS = SCS+1; $('.SCSlider').anythingSlider(SCS); } }, wipeRight: function(result) { if (SCS > 1) { SCS = SCS-1; $('.SCSlider').anythingSlider(SCS); } }, }); function resizesliders() { $(".ASContainer").each(function() { var w = parseInt($(this).width()); var id = $(this).attr("id"); if (id == 'HomepageSliderContainer') { var h = 504; dw = 999;} if (id == 'HomepageBlogSliderContainer') { var h = 685; dw = 969; } if (id == 'BlogSliderContainer') { var h = 504; dw = 999; } if (id == 'BigGallery') { var h = 504; dw = 971; } if (id == 'VerticalGallery') { var h = 643; dw = 668; } if (id == 'TestimonialsContainer') { var nh = parseInt($(this).children().children().children().children().children(".testimonial").height())+100; } else { var nh = parseInt(h*(w/dw)); } // homepage slider info if ($(this).children("div").children("div").children("ul").children("li").children(".info").children("h2").css("display") == 'none') { var nmt = -120; } else { var nmt = -270; } $(this).css({height: nh}); $(this).children(".anythingSlider").css({height: nh}); $(this).children("div").children("div").children("ul").children("li").children(".info").css({marginTop: nmt}); if (id == 'VerticalGallery') { $(".VerticalGalleryThumbsC").css({height: nh}); $(".VerticalGalleryThumbsC .VerticalGalleryThumbs li").css({height: nh}); } }); $('.BigGalleryThumbsSlide li').jScrollPane(); $('.VerticalGalleryThumbs li').jScrollPane(); } function resizefb() { var fbw = parseInt($(".fb-like-box").parent(".widget").width()); $(".fb-like-box").css({width: fbw}).attr("data-width", fbw); $(".fb-like-box").children("span").css({width: fbw}); $(".fb-like-box").children("span").children("iframe").css({width: fbw}); } //initsliders(); resizefb(); resizesliders(); $(window).resize(function() { resizesliders(); resizefb(); // facebook }); //quick sand // Clone portfolio items to get a second collection for Quicksand plugin var $portfolioClone = $("#gallery").clone(); // Attempt to call Quicksand on every click event handler $("#gallery-filters li a").click(function(e){ $("#gallery-filters li a").removeClass("active"); // Get the class attribute value of the clicked link var $filterClass = $(this).attr("href").replace("#",""); if ( $filterClass == "all" ) { var $filteredPortfolio = $portfolioClone.find("a"); } else { var $filteredPortfolio = $portfolioClone.find("a[data-type~=" + $filterClass + "]"); } // Call quicksand $("#gallery").quicksand( $filteredPortfolio, { duration: 800, easing: 'easeInOutQuad' }, function(){ // Blur newly cloned portfolio items on mouse over and apply prettyPhoto $("#gallery a").hover( function(){ $(this).children("img").animate({ opacity: 0.75 }, "fast"); }, function(){ $(this).children("img").animate({ opacity: 1.0 }, "slow"); }); $(".vendor").mouseover(function() { if (!$(this).hasClass("inactive")) { $(this).children(".shadow").children(".vthumb").children("span").animate({opacity: 1}, 200); $(this).children("span").children(".v-title").animate({color: '#dd607d'}, 200); } }).mouseleave(function() { $(this).children(".shadow").children(".vthumb").children("span").animate({opacity: 0}, 200); $(this).children("span").children(".v-title").animate({color: '#ff9194'}, 200); }); $("a.pic").fancybox({ 'titleShow' : false, 'transitionIn' : 'fade', 'transitionOut' : 'fade' }); $("a.video").click(function(){ $.fancybox({ 'titleShow' : false, 'transitionIn' : 'fade', 'transitionOut' : 'fade', 'href' : this.href = this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'), 'type' : 'iframe', 'swf' : {'wmode':'transparent','allowfullscreen':'true'} }); return false; }); /* $(".portfolio a[rel^='prettyPhoto']").prettyPhoto({ theme:'light_square', autoplay_slideshow: false, overlay_gallery: false, show_title: false });*/ }); $(this).addClass("active"); // Prevent the browser jump to the link anchor e.preventDefault(); }) $(".MobileMainMenu").change(function(){ window.location = $(this).val(); }); });