jQuery(document).ready(function ($) { $('.accordion').on('show', function (e) { $(e.target).prev('.accordion-heading').find('.accordion-toggle').addClass('active'); }); $('.accordion').on('hide', function (e) { $(this).find('.accordion-toggle').not($(e.target)).removeClass('active'); }); $('.myTab a').click(function (e) { e.preventDefault(); $(this).tab('show'); }); $('.widget_nav_menu .sub-menu').removeClass('sub-menu'); $('.sub-menu').parent().addClass('deeper'); // Popovers $("[rel='popover']").popover(); $('#searchform #s').val("Search"); $('.blog-box-2-col-items:odd').after('
'); // Responsive Nav var $mainNav = $('.main-menu'); var optionsList = ''; $mainNav.find('li').each(function() { var $this = $(this), $anchor = $this.children('a'), depth = $this.parents('ul').length - 1, indent = ''; if( depth ) { while( depth > 0 ) { indent += ' - '; depth--; } } optionsList += ''; }).end().last() .after(''); $('.responsive-nav').on('change', function() { window.location = $(this).val(); }); $(".menu2").parent().find("select.responsive-nav").addClass("responsive-nav-menu2"); // end $(".wrapMainImg, .portfolio-img").fancybox(); $('.wrapMainImg').prepend(''); $('.wrapMainImg .my_more').hide(); $('.wrapMainImg').hover(function() { $(this).find('.my_more').stop().fadeIn('fast'); }, function () { $(this).find('.my_more').stop().fadeOut('fast'); }); $(window).resize(function() { //Fires when window is resized if ($('body').width() < 979) { $('header .menu1, header .menu2').unbind('.namespace'); } else {$('header .menu1, header .menu2').trigger('.namespace');} }); $(window).resize(); // $("[class *= 'box1']").css({"background" : "red" , "margin-bottom" : "0"}); // $("[class *= 'box']").each(function() { // if ($(this).parent().hasClass("wpb_row")) $(this).parent().prev().children("[class *= 'box1']").css({"margin-bottom" : "0"}); // }) // $("[class *= 'box'] + [class *= 'box']").prev().css({"margin-bottom" : "0"}); // $(".box1 + .box1_1").prev().css({"margin-bottom" : "0"}); // $(".box1 + .box1_2").prev().css({"margin-bottom" : "0"}); // $(".box1 + .box1_3").prev().css({"margin-bottom" : "0"}); // $(".box1 + .box1_4").prev().css({"margin-bottom" : "0"}); // $(".box1 + .box2").prev().css({"margin-bottom" : "0"}); // $(".box2 + .box2").prev().css({"margin-bottom" : "0"}); $(".box4 .wpb_thumbnails > li").each(function (i) { $(this).find('.post-thumb .link_image').clone().appendTo($(this).find('.entry-content')).addClass('link_image_icon'); $(".link_image_icon").empty(); $(this).find(".post-title").appendTo(this); $(this).find('.post-title').clone().prependTo($(this).find('.entry-content')); $(this).hover(function(){ $(this).find(".entry-content").stop().animate({opacity: 1},500); }, function () { $(".entry-content").stop().animate({opacity: 0},500); }); }); $(".box4_1 .wpb_thumbnails > li").each(function (i) { $(this).find('.post-thumb .link_image').clone().appendTo($(this).find('.entry-content')).addClass('link_image_icon'); $(".link_image_icon").empty(); $(this).find(".post-title").appendTo(this); $(this).find('.post-title').clone().prependTo($(this).find('.entry-content')); $(this).hover(function(){ $(this).find(".entry-content").stop().animate({opacity: 1},500); }, function () { $(".entry-content").stop().animate({opacity: 0},500); }); }); $('#container > .container > p:empty + .row-fluid').prev('p').remove(); $("#container > .container > [class *= 'box1']:first-child").css({"margin-top" : "-35px"}); $("#container > .container > .wpb_row:first-child [class *= 'box1']:first-child").css({"margin-top" : "-35px"}); // $(".gallery-columns-1").addClass("row-fluid").children(".gallery-item").addClass("span12").removeClass("gallery-item"); // $(".gallery-columns-2").addClass("row-fluid").children(".gallery-item").addClass("span6").removeClass("gallery-item"); // $(".gallery-columns-3").addClass("row-fluid").children(".gallery-item").addClass("span4").removeClass("gallery-item"); // $(".gallery-columns-4").addClass("row-fluid").children(".gallery-item").addClass("span3").removeClass("gallery-item"); // $(".gallery-columns-5").addClass("row-fluid").children(".gallery-item").addClass("span3").removeClass("gallery-item"); // $(".gallery-columns-6").addClass("row-fluid").children(".gallery-item").addClass("span3").removeClass("gallery-item"); // $(".gallery-columns-7").addClass("row-fluid").children(".gallery-item").addClass("span3").removeClass("gallery-item"); });