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); function Set_Cookie( name, value, expires, path, domain, secure ) { var today = new Date(); today.setTime( today.getTime() ); if ( expires ) { expires = expires * 1000 * 60 * 60 * 24; } var expires_date = new Date( today.getTime() + (expires) ); document.cookie = name + "=" +escape( value ) + ( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) + ( ( path ) ? ";path=" + path : "" ) + ( ( domain ) ? ";domain=" + domain : "" ) + ( ( secure ) ? ";secure" : "" ); } function Get_Cookie( check_name ) { var a_all_cookies = document.cookie.split( ';' ); var a_temp_cookie = ''; var cookie_name = ''; var cookie_value = ''; var b_cookie_found = false; for ( i = 0; i < a_all_cookies.length; i++ ) { a_temp_cookie = a_all_cookies[i].split( '=' ); cookie_name = a_temp_cookie[0].replace(/^\s+|\s+$/g, ''); if ( cookie_name == check_name ) { b_cookie_found = true; if ( a_temp_cookie.length > 1 ) { cookie_value = unescape( a_temp_cookie[1].replace(/^\s+|\s+$/g, '') ); } return cookie_value; break; } a_temp_cookie = null; cookie_name = ''; } if ( !b_cookie_found ) { return null; } } $(document).ready(function(){ // clear input $('input.input-topbg').clearDefault(); /* var defaults = { containerID: 'moccaUItoTop', // fading element id containerHoverClass: 'moccaUIhover', // fading element hover class scrollSpeed: 1200, easingType: 'linear' }; */ $().UItoTop({ easingType: 'easeOutQuart' }); $("#foo").carouFredSel({ circular: false, infinite: true, auto : true, //width: "variable", items: { visible: "variable", width: 235, height: "variable" }, scroll: { mousewheel: true, //items: 3, 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'); }); // ///////////////// menu accordion $(".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(); } // ///////////////// 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; //}); //});