function addtext() { var nazwa_odbiorcy = document.myform.nazwa_odbiorcy.value; var ulica_adres = document.myform.ulica_adres.value; var miasto = document.myform.miasto.value; var kod_pocztowy = document.myform.kod_pocztowy.value; document.myform.nazwa_odbiorcy_fv.value = nazwa_odbiorcy; document.myform.ulica_adres_fv.value = ulica_adres; document.myform.miasto_fv.value = miasto; document.myform.kod_pocztowy_fv.value = kod_pocztowy; } function sec() { var nazwa_odbiorcy = document.myform.nazwa_odbiorcy.value; var ulica_adres = document.myform.ulica_adres.value; var miasto = document.myform.miasto.value; var kod_pocztowy = document.myform.kod_pocztowy.value; document.myform.nazwa_odbiorcy_pr.value = nazwa_odbiorcy; document.myform.ulica_adres_pr.value = ulica_adres; document.myform.miasto_pr.value = miasto; document.myform.kod_pocztowy_pr.value = kod_pocztowy; } // clear input (function($){ $.fn.clearDefault = function(){ return this.each(function(){ var default_value = $(this).val(); $(this).focus(function(){ if ($(this).val() == default_value) $(this).val(""); }); $(this).blur(function(){ if ($(this).val() == "") $(this).val(default_value); }); }); }; })(jQuery); $(document).ready(function(){ // clear input $('input.input-topbg').clearDefault(); //$('.trig3:first').addClass('active3').next(".menu_toggle").slideDown("slow"); //Add "active" class to first trigger, then show/open the immediate next container // menu accordion main cat $(".menu_toggle").filter(function(){return $(this).prev().hasClass("active3")==false}).hide(); $(".trig3").click(function(){ var th=$(this); if (th.hasClass("active3")) { th.next().slideUp("slow,",function(){th.removeClass("active3");}); } else { $(".active3").removeClass("active3"); $(".menu_toggle").slideUp(500, function(){ $(".active3").filter(function(){ return $(this).index(".active3")!=th.index(".active3") }).removeClass("active3"); }); th.addClass("active3").next(".menu_toggle").slideDown("slow"); } return false; }); if ($("#active3").next().is(':hidden') ) { $('.trig3').removeClass('active3').next().slideUp(); $("#active3").removeClass("active3").click(); } // menu accordion menu open all tabs - main cat //$(".menu_toggle").hide(); // //$('.trig3:first').addClass('active').next().show(); //Add "active" class to first trigger, then show/open the immediate next container //$(".trig3").toggle(function(){ //$(this).addClass("active3"); // }, function () { //$(this).removeClass("active3"); //}); //$(".trig3").click(function(){ //$(this).next(".menu_toggle").slideToggle("slow,"); //}); //if( $("h2#active3").next().is(':hidden') ) { //If immediate next container is closed... //$('h2.trig3').removeClass('active3').next().slideUp(); //Remove all "active" state and slide up the immediate next container // //$(this).toggleClass('active3').next().slideDown(); //Add "active" state to clicked trigger and slide down the immediate next container // $("h2#active3").removeClass("active3").click(); //} // ///////////////// menu accordion sub cat $(".toggle_container").hide(); $(".trigger").click(function(){ $(this).toggleClass("active").next().slideToggle("slow"); }); $(".toggle").hide(); //$j('.trig:first').addClass('active').next().show(); //Add "active" class to first trigger, then show/open the immediate next container $(".trig").toggle(function(){ $(this).addClass("active"); }, function () { $(this).removeClass("active"); }); $(".trig").click(function(){ $(this).next(".toggle").slideToggle("slow,"); }); if( $("#active").next().is(':hidden') ) { //If immediate next container is closed... $('.trig').removeClass('active').next().slideUp(); //Remove all "active" state and slide up the immediate next container //$j(this).toggleClass('active').next().slideDown(); //Add "active" state to clicked trigger and slide down the immediate next container $("#active").removeClass("active").click(); } /* var defaults = { containerID: 'moccaUItoTop', // fading element id containerHoverClass: 'moccaUIhover', // fading element hover class scrollSpeed: 1200, easingType: 'linear' }; */ $().UItoTop({ easingType: 'easeOutQuart' }); $("#foo").carouFredSel({ items: 1, circular: false, infinite: true, auto : true, // width: "variable", // items: { //visible: "variable", //width: 600, //height: "variable" //}, scroll: { mousewheel: true, items: 1, items: "page", pauseOnHover: true }, prev: { button: "#foo_prev", key: "left" }, next: { button: "#foo_next", key: "right" }, pagination: "#foo_pag" }); $('#dalej').toggle(function(){ $('#showDalej').slideDown('normal'); $('#showDalej').addClass("searchContener"); },function(){ $('#showDalej').slideUp('normal'); }); // ///////////////// koszyk $('#toggleInvoice').css("display", "none"); $('#chkInvoice').click(function ShowInvoice() { if ($('#chkInvoice').is(':checked')) { $('#toggleInvoice').slideDown(); } else { $('#toggleInvoice').slideUp(); } }); $('#toggleComment').css("display", "none"); $('#chkComment').click(function ShowComment() { if ($('#chkComment').is(':checked')) { $('#toggleComment').slideDown(); } else { $('#toggleComment').slideUp(); } }); $('#toggleDedykacja').css("display", "none"); $('#chkDedykacja').click(function ShowDedykacja() { if ($('#chkDedykacja').is(':checked')) { $('#toggleDedykacja').slideDown(); } else { $('#toggleDedykacja').slideUp(); } }); $.superbox.settings = { closeTxt: "Close", loadTxt: "Loading...", nextTxt: "Next", prevTxt: "Previous" }; $.superbox(); }); // ****************************** tabs //jQuery(document).ready(function(){ //jQuery(".tab_content").hide(); //Hide all content //jQuery("ul.tabs li:first").addClass("active").show(); //Activate first tab //jQuery(".tab_content:first").show(); //Show first tab content //On Click Event //jQuery("ul.tabs li").click(function() { //jQuery("ul.tabs li").removeClass("active"); //Remove any ?active? class //jQuery(this).addClass("active"); //Add ?active? class to selected tab //jQuery(".tab_content").hide(); //Hide all tab content //var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content //activeTab = activeTab.split("#"); //bugfixed by droope :) //if (jQuery.browser.msie) //{jQuery("#"+activeTab[activeTab.length-1]).show(); } //else //{jQuery("#"+activeTab[activeTab.length-1]).fadeIn(); } //$("#"+activeTab[activeTab.length-1]).fadeIn(); //Fade in the active ID content //return false; //}); //});