// ************************ // *** animacje JD menu *** // ************************ function onAnimateFadeInOut(show) { if (show) { $(this).hide().fadeIn('normal'); } else { $(this).fadeOut('normal'); } } function onAnimateSlideUpDown(show) { if (show) { $(this).hide().slideDown('fast'); } else { $(this).slideUp('fast'); } } function onAnimateSlideLeftRight(show) { if (show) { $(this).hide().animate({width: 'show'}, 'fast'); } else { $(this).animate({width: 'hide'}, 'fast'); } } function onAnimateShowHide(show) { if (show) { $(this).hide().show('normal'); } else { $(this).hide('normal'); } } // *********************** $.extend($.validator.messages, { required: "pole wymagane" }); $(document).ready(function(){ $("#CMSform").validate({errorElement: "span", errorPlacement: function(error, element) {error.appendTo(element.parent().prev());} }); $("a.slidedown").click(function(event){ event.preventDefault(); if ($(this).hasClass("slidedown")) { $('#linkBox div').hide().slideDown('fast'); $('#linkownia').removeClass(); $('#linkownia').addClass('slideup'); } else { $('#linkownia').removeClass(); $('#linkownia').addClass('slidedown'); $('#linkBox div').slideUp('fast') } }); }); // ******************** // *** site map hover *** // ******************** $(document).ready(function(){ $("#sitemap li").hover( function () { $(this).addClass("hover"); }, function () { $(this).removeClass("hover"); } ); }); // ***************** // *** help search *** // ***************** $(document).ready(function(){ $("#fund_search_container #help").hover( function () { $("#fund_search_container").addClass("helpHover"); }, function () { $("#fund_search_container").removeClass("helpHover"); } ); }); // ************************ // ******* lang anim ******* // ************************ $(document).ready(function(){ $("#regions_container ul").hover( function () { $(this).addClass("regions_visible"); }, function () { $(this).removeClass("regions_visible"); } ); }); $(document).ready(function(){ $("#tabs div:first").css("display", "block"); var first_li = $("#news_cat_container li:first"); var span = $("").text($(first_li).text()); $(first_li).hide(); $("#news_cat_container").prepend(span); $("#news_cat_container li").click( function () { var cat_id = $(this).attr('id'); var tab_id = cat_id+"_tab"; $("#"+tab_id).show(); $("#news_cat_container span").remove(); $("#news_cat_container li").show(); var span = $("").text($(this).text()); $(this).hide(); $("#news_cat_container").prepend(span); //$(this).replaceWith($("#news_cat_container li:first")); //$("#"+tab_id).addClass('tab_visible'); //$("#tabs li:not(#18_tab)").hide(); $("#"+tab_id).siblings().hide(); //$("#tabs li").hide(); } ); }); $(document).ready(function(){ //alert('aaaaaa'); //$('#all_news').load('news_ajax'); /* $("#loading").ajaxStart(function(){ $(this).show(); }); $("#loading").ajaxStop(function(){ $(this).hide(); }); */ $.ajax({ url: "news_ajax", beforeSend:function(){ $("#loading").show(); }, cache: false, success: function(html){ $("#loading").hide(); $("#all_news").append(html); } }); $.ajax({ url: "news_slot_ajax", beforeSend:function(){ $("#loading_slot").show(); }, cache: false, success: function(html){ $("#loading_slot").hide(); $("#slideBox").append(html); news_slider();} }); //setTimeout("loadNews",3000); function news_slider() { $(function(){ $('.SlideTab').tabSwitch('create',{width: 183, height: 110}); $('.SlideTab').tabSwitch('startAuto',{interval: 8000}); $('.Nav').click(function(e){ $('.SlideTab').tabSwitch('moveStep',{step: parseInt($(this).attr("rel"))}); e.preventDefault(); }); }); $("#news_cat_container").toggle( function () { $("#news_cat_container ul").addClass("news_cat_visible"); }, function () { $("#news_cat_container ul").removeClass("news_cat_visible"); } ); $("#news_cat_container span, #news_cat_container li").hover( function () { $(this).addClass("hover"); }, function () { $(this).removeClass("hover"); } ); } });