var $j = jQuery.noConflict(); function moveDownMenu(){ $j('.move_down > ul > li').each(function(){ var height = $j(this).find('.second').height(); var header_height = $j('header').height(); var movedown_config = { interval: 100, over: function(){ $j(this).find('.second').height(0); $j(this).find('.second').css('visibility','visible'); $j(this).find('.second').stop().animate({height:height},800); if(height > 0){ $j('.content').stop().animate({'padding-top':height+header_height + 0 + 1},800); $j('.content_inner').css('margin-top','1px'); $j('.move_menu_separator').css('border-width','1px'); } }, timeout: 100, out: function(){ $j(this).find('.second').stop().animate({height:0},800,function(){ $j(this).css('visibility','hidden'); $j(this).height(0); }); $j('.content').stop().animate({'padding-top':header_height},800,function(){ $j('.content_inner').css('margin-top','0px'); $j('.move_menu_separator').css('border-width','0px'); }); } }; $j(this).hoverIntent(movedown_config); }); } function initBigSlider(){ $j('.flexslider').flexslider({ animationLoop: true, controlNav: false, useCSS: false, pauseOnAction: true, pauseOnHover: true, slideshow: true, animation: "slide", animationSpeed: 600, slideshowSpeed: 8000, start: function(){ setTimeout(function(){$j(".flexslider").fitVids();},100); } }); $j('.flex-direction-nav a').click(function(e){ e.preventDefault(); e.stopImmediatePropagation(); e.stopPropagation(); }); } function initSmallSlider(){ $j('.slider_small.type1').each(function(){ if($j(this).find('.bx-wrapper').length == 0){ $j(this).find('ul.slider').bxSlider({ pager: false, minSlides: 1, maxSlides: 3, slideWidth: 243, slideMargin: 20, infiniteLoop: true, useCSS: false, speed: 500, onSlideNext: function ($slideElement, oldIndex, newIndex){ var total = $slideElement.closest('.slider_small').find('.slide_counter_total_val').html(); var new_index = newIndex*3+3; if (new_index > total) new_index = total; $slideElement.closest('.slider_small').find('.slide_counter_val').html(new_index); }, onSlidePrev: function ($slideElement, oldIndex, newIndex){ var total = $slideElement.closest('.slider_small').find('.slide_counter_total_val').html(); var new_index = newIndex*3+3; if (new_index > total) new_index = total; $slideElement.closest('.slider_small').find('.slide_counter_val').html(new_index); } }); } }); $j('.slider_small.type2').each(function(){ $holder2 = $j(this); if($j(this).find('.bx-wrapper').length == 0){ var slider2 = $j(this).find('ul.slider').bxSlider({ pager: false, minSlides: 1, maxSlides: 4, slideWidth: 177, slideMargin: 20, useCSS: false, speed: 500, onSlideNext: function ($slideElement, oldIndex, newIndex){ var total = $slideElement.closest('.slider_small').find('.slide_counter_total_val').html(); var new_index = newIndex*4+4; if (new_index > total) new_index = total; $slideElement.closest('.slider_small').find('.slide_counter_val').html(new_index); }, onSlidePrev: function ($slideElement, oldIndex, newIndex){ var total = $slideElement.closest('.slider_small').find('.slide_counter_total_val').html(); var new_index = newIndex*4+4; if (new_index > total) new_index = total; $slideElement.closest('.slider_small').find('.slide_counter_val').html(new_index); } }); } }); var config = { interval: 100, over: function(){ $height = $height = $j(this).find("img").height(); $j(this).find(".image").stop().animate({ height: 0, margin:0, easing: 'easeInOutQuart' }, 400, function() { $j(this).parent().find("p,a,hr").fadeIn(200); }); }, timeout: 0, out: function(){ $j(this).find("p,a,hr").hide(100); $j(this).find(".image").stop().animate({ height: $height, margin: "0px 0px 8px 0px", easing: 'easeInOutQuart' }, 400, function() { }); } }; $j(".content .slider_small .slide_item").each(function(){ $j(this).hoverIntent(config); }); } function ajaxSubmitCommentForm(){ var options = { success: function(){ $j("#commentform textarea").val(""); $j("#commentform .success p").text("Comment has been sent!"); } }; $j('#commentform').submit(function() { $j(this).find('input[type="submit"]').next('.success').remove(); $j(this).find('input[type="submit"]').after('

') $j(this).ajaxSubmit(options); return false; }); }