var line_height = 80; var line_height_a = 80 - 6; var logo_height; // it's value is calculated in window load function var height_span = 80 - 6; var height_wpml = 80 - 5; function headerSize(scroll){ "use strict"; if((line_height - scroll) > line_height){ $j('header .header_inner nav.main_menu > ul > li > a').stop().animate({'line-height': line_height_a+'px'},200); $j('header .header_inner nav.main_menu > ul > li > a > span').stop().animate({'height': height_span+'px'},200); $j('header .header_inner .header_right_widget').stop().animate({'line-height': line_height+'px'},200); $j('header .header_inner .drop_down .second').stop().animate({'top': line_height+'px'},100); $j('header .header_inner .drop_down2 .second').stop().animate({'top': line_height+'px'},100); $j('header .header_inner .header_right_widget #lang_sel_list > ul > li > a').stop().animate({'line-height': height_span+'px'},100); $j('header .header_inner .header_right_widget #lang_sel > ul > li > a').stop().animate({'line-height': height_span+'px'},100); $j('header .header_inner .header_right_widget #lang_sel_click > ul > li > a').stop().animate({'line-height': height_span+'px'},100); $j('header .header_inner .header_right_widget #lang_sel ul ul').stop().animate({'top': line_height+'px'},100); $j('header .header_inner .header_right_widget #lang_sel_click ul ul').stop().animate({'top': line_height+'px'},100); }else if((line_height - scroll) < line_height){ $j('header').addClass('move_menu'); $j('header .header_inner nav.main_menu > ul > li > a').stop().animate({'line-height': '58px'},200); $j('header .header_inner nav.main_menu > ul > li > a > span').stop().animate({'height': '60px'},200); $j('header .header_inner .header_right_widget').stop().animate({'line-height': '64px'},200); $j('header .header_inner .drop_down .second').stop().animate({'top': '66px'},100); $j('header .header_inner .drop_down2 .second').stop().animate({'top': '66px'},100); $j('header .header_inner .header_right_widget #lang_sel > ul > li > a').stop().animate({'line-height': 61+'px'},100); $j('header .header_inner .header_right_widget #lang_sel_click > ul > li > a').stop().animate({'line-height': 61+'px'},100); $j('header .header_inner .header_right_widget #lang_sel_list > ul > li > a').stop().animate({'line-height': 61+'px'},100); $j('header .header_inner .header_right_widget #lang_sel ul ul').stop().animate({'top': '66px'},100); $j('header .header_inner .header_right_widget #lang_sel_click ul ul').stop().animate({'top': '66px'},100); }else if(scroll === 0){ $j('header .header_inner nav.main_menu > ul > li > a').stop().animate({'line-height': line_height_a+'px'},100); $j('header .header_inner nav.main_menu > ul > li > a > span').stop().animate({'height': height_span+'px'},200); $j('header .header_inner .header_right_widget').stop().animate({'line-height': line_height+'px'},100); $j('header .header_inner .drop_down .second').stop().animate({'top': line_height+'px'},200); $j('header .header_inner .drop_down2 .second').stop().animate({'top': line_height+'px'},200); $j('header .header_inner .header_right_widget #lang_sel > ul > li > a').stop().animate({'line-height': height_wpml+'px'},100); $j('header .header_inner .header_right_widget #lang_sel_click > ul > li > a').stop().animate({'line-height': height_wpml+'px'},100); $j('header .header_inner .header_right_widget #lang_sel_list > ul > li > a').stop().animate({'line-height': height_wpml+'px'},100); $j('header .header_inner .header_right_widget #lang_sel ul ul').stop().animate({'top': line_height+'px'},200); $j('header .header_inner .header_right_widget #lang_sel_click ul ul').stop().animate({'top': line_height+'px'},200); $j('header').removeClass('move_menu'); } if(scroll === 0 && line_height - logo_height >= 10){ $j('.logo a').height(logo_height); }else if(scroll === 0 && line_height - logo_height < 10){ $j('.logo a').height(line_height - 10); }else if( scroll !== 0 && logo_height >= 55){ $j('.logo a').height(55); }else if( scroll !== 0 && logo_height < 55){ $j('.logo a').height(logo_height); } } function setLogoHeightOnLoad(){ "use strict"; if(line_height - logo_height >= 10){ $j('.logo a').height(logo_height); }else if(line_height - logo_height < 10){ $j('.logo a').height(line_height - 10); } $j('.logo a img').css('height','100%'); } function ajaxSubmitCommentForm(){ "use strict"; 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('