function niceScroll(obj_id){ var targetOffset = $(obj_id).offset().top; $('html,body').animate({scrollTop: targetOffset}, 1000); } $(document).ready(function($) { $("#menu_first li a").hover(function() { if ($(this).parent().hasClass('active') == false){ $(this).parent().css({'background-color':'#5e4124'}); $(this).css({'color':'#fff','padding-left':'20px','margin-left':'9px'}); } } , function() { //On hover out... if ($(this).parent().hasClass('active') == false){ $(this).parent().css({'background-color':'transparent'}); $(this).css({'color':'#f8f1d7','padding-left':'15px','margin-left':'6px'}); } }); $("#menu_first li a.submenu").hover(function() { if ($(this).parent().hasClass('active') == false){ $(this).parent().css({'backgroundPosition':'(0 0)'}); $(this).css({'color':'#fff','padding-left':'15px','margin-left':'0px'}); } } , function() { //On hover out... if ($(this).parent().hasClass('active') == false){ $(this).parent().css({'backgroundPosition':'(-230px 0)'}); $(this).css({'color':'#f8f1d7','padding-left':'8px','margin-left':'0px'}); } }); $("#menu_first li").hover(function() { $(this).find('ul.m_level_1').css({'display':'block','visibility':'visible'}); } , function() { //On hover out... $(this).find('ul.m_level_1').css({'display':'none','visibility':'hidden'}); }); $("ul.m_level_1>li").hover(function() { $(this).find('ul.m_level_2').css({'display':'block','visibility':'visible'}); if (( $.browser.opera ) || ($.browser.msie)){ $(this).parent().parent().parent().css({'background-color':'#5e4124'}); } else { $(this).parent().parent().css({'background-color':'#5e4124'}); } } , function() { //On hover out... $(this).find('ul.m_level_2').css({'display':'none','visibility':'hidden'}); if (( $.browser.opera ) || ($.browser.msie)){ $(this).parent().parent().parent().css({'background-color':'transparent'}); } else { $(this).parent().parent().css({'background-color':'transparent'}); } }); $("ul.m_level_2 li").hover(function() { $(this).find('ul.m_level_3').css({'display':'block','visibility':'visible'}); } , function() { //On hover out... $(this).find('ul.m_level_3').css({'display':'none','visibility':'hidden'}); }); $("ul.m_level_3 li").hover(function() { $(this).find('ul.m_level_4').css({'display':'block','visibility':'visible'}); } , function() { //On hover out... $(this).find('ul.m_level_4').css({'display':'none','visibility':'hidden'}); }); $("ul.m_level_4 li").hover(function() { $(this).find('ul.m_level_5').css({'display':'block','visibility':'visible'}); } , function() { //On hover out... $(this).find('ul.m_level_5').css({'display':'none','visibility':'hidden'}); }); }); function rollingmenu(which){ switch(which){ case 1: $('#menu_first_2').slideUp('slow'); $('#menu_first_3').slideUp('slow'); $('#menu_first_1').slideDown('slow'); $('#menu_first_btn_1').find('i').html('[-]'); $('#menu_first_btn_2').find('i').html('[+]'); $('#menu_first_btn_3').find('i').html('[+]'); break; case 2: $('#menu_first_1').slideUp('slow'); $('#menu_first_3').slideUp('slow'); $('#menu_first_2').slideDown('slow'); $('#menu_first_btn_2').find('i').html('[-]'); $('#menu_first_btn_1').find('i').html('[+]'); $('#menu_first_btn_3').find('i').html('[+]'); break; case 3: $('#menu_first_1').slideUp('slow'); $('#menu_first_2').slideUp('slow'); $('#menu_first_3').slideDown('slow'); $('#menu_first_btn_3').find('i').html('[-]'); $('#menu_first_btn_1').find('i').html('[+]'); $('#menu_first_btn_2').find('i').html('[+]'); break; } } $(document).ready(function($) { $("#menu_second li a").hover(function() { //alert('x'); if ($(this).parent().hasClass('active') == false){ $(this).parent().stop().animate({ backgroundPosition: "(0 0)" }, 250); $(this).stop().animate({ color: "#d3b28e", paddingLeft: "14px", marginLeft: "3px" }, 250); } } , function() { //On hover out... if ($(this).parent().hasClass('active') == false){ $(this).parent().stop().animate({ backgroundPosition: "(-230px 0)" }, 250); $(this).stop().animate({ color: "#8e5e3e", paddingLeft: "10px", marginLeft: "0px" }, 250); } }); }); var vtemp_last_submenu_opened = 1; function subContent(m_main,m_sub,obj){ //zaznacz właściwą zakałdkę $('.m_submenu_list ul li a').each( function(){ $(this).removeClass('active').css({'padding-left':'35px','color':'#ffffff'}); }); $(obj).addClass('active').css({'padding-left':'35px','color':'#f09ece'}); $('#right_main_cont1').stop().animate({ right: "-1000" }, 1250, function(){ $('#content_'+m_main+'_'+vtemp_last_submenu_opened).css({'display':'none'}); $('#content_'+m_main+'_'+m_sub).css({'display':'block'}); jQuery('#pane_'+m_sub).jScrollPane(); vtemp_last_submenu_opened = m_sub; $('#right_main_cont1').animate({ right: "0" }, 1250); } ); } $(document).ready(function($) { $("a.menu_first_cat_main").hover(function() { //if ($(this).hasClass('active') == false){ $(this).stop().animate({ paddingLeft: "20", color: "#d4af3c" }, 250); //} } , function() { //On hover out... //if ($(this).hasClass('active') == false){ $(this).stop().animate({ paddingLeft: "6", color: "#ffffff" }, 250); //} }); }); $(document).ready(function($) { $(".m_menu li a").hover(function() { if ($(this).hasClass('active') == false){ $(this).stop().animate({ paddingLeft: "30", color: "#d4af3c" }, 250); } } , function() { //On hover out... if ($(this).hasClass('active') == false){ $(this).stop().animate({ paddingLeft: "15", color: "#ffffff" }, 250); } }); $(".m_submenu_list ul li a").hover(function() { if ($(this).hasClass('active') == false){ $(this).stop().animate({ paddingLeft: "45", color: "#d4af3c" }, 250); } } , function() { //On hover out... if ($(this).hasClass('active') == false){ $(this).stop().animate({ paddingLeft: "35", color: "#ffffff" }, 250); } }); }); $(function () { if ($.browser.msie && $.browser.version < 7) return; if ( $.browser.msie ){ } else { $('#menu_top_id li').find('a span').each(function () { if ($(this).parent().hasClass('active') == false){ var jQspan = $(this).css('opacity', 0); // when the user hovers in and out of the anchor $(this).hover(function () {// on hover jQspan.stop().fadeTo(350, 1); if ($(this).parent().hasClass('city') == true){ $(this).next().stop().animate({ left: "40px" }, 300); } if ($(this).parent().hasClass('tv') == true){ $(this).next().stop().animate({ right: "23px" }, 300); } }, function () {// off hover jQspan.stop().fadeTo(350, 0); if ($(this).parent().hasClass('city') == true){ $(this).next().stop().animate({ left: "56px" }, 300); } if ($(this).parent().hasClass('tv') == true){ $(this).next().stop().animate({ right: "7px" }, 300); } }); }//edn if }); } }); $(function () { if ($.browser.msie && $.browser.version < 7) return; if ( $.browser.msie ){ } else { $('ul#menu_lang_id li').find('a span').each(function () { if ($(this).parent().hasClass('active') == false){ var jQspan = $(this).css('opacity', 0); // when the user hovers in and out of the anchor $(this).hover(function () {// on hover jQspan.stop().fadeTo(350, 1); }, function () {// off hover jQspan.stop().fadeTo(350, 0); }); }//edn if }); } }); /** * @author Alexander Farkas * v. 1.21 */ (function($) { if(!document.defaultView || !document.defaultView.getComputedStyle){ // IE6-IE8 var oldCurCSS = jQuery.curCSS; jQuery.curCSS = function(elem, name, force){ if(name === 'background-position'){ name = 'backgroundPosition'; } if(name !== 'backgroundPosition' || !elem.currentStyle || elem.currentStyle[ name ]){ return oldCurCSS.apply(this, arguments); } var style = elem.style; if ( !force && style && style[ name ] ){ return style[ name ]; } return oldCurCSS(elem, 'backgroundPositionX', force) +' '+ oldCurCSS(elem, 'backgroundPositionY', force); }; } var oldAnim = $.fn.animate; $.fn.animate = function(prop){ if('background-position' in prop){ prop.backgroundPosition = prop['background-position']; delete prop['background-position']; } if('backgroundPosition' in prop){ prop.backgroundPosition = '('+ prop.backgroundPosition; } return oldAnim.apply(this, arguments); }; function toArray(strg){ strg = strg.replace(/left|top/g,'0px'); strg = strg.replace(/right|bottom/g,'100%'); strg = strg.replace(/([0-9\.]+)(\s|\)|$)/g,"$1px$2"); var res = strg.match(/(-?[0-9\.]+)(px|\%|em|pt)\s(-?[0-9\.]+)(px|\%|em|pt)/); return [parseFloat(res[1],10),res[2],parseFloat(res[3],10),res[4]]; } $.fx.step. backgroundPosition = function(fx) { if (!fx.bgPosReady) { var start = $.curCSS(fx.elem,'backgroundPosition'); if(!start){//FF2 no inline-style fallback start = '0px 0px'; } start = toArray(start); fx.start = [start[0],start[2]]; var end = toArray(fx.options.curAnim.backgroundPosition); fx.end = [end[0],end[2]]; fx.unit = [end[1],end[3]]; fx.bgPosReady = true; } //return; var nowPosX = []; nowPosX[0] = ((fx.end[0] - fx.start[0]) * fx.pos) + fx.start[0] + fx.unit[0]; nowPosX[1] = ((fx.end[1] - fx.start[1]) * fx.pos) + fx.start[1] + fx.unit[1]; fx.elem.style.backgroundPosition = nowPosX[0]+' '+nowPosX[1]; }; })(jQuery);