var templatename = '_TEMPLATENAME';var slidertime = '3'; $(function() { var wins = [".tblMarka",".tblKategoria",".tblRozmiar"]; for ( var i in wins ) { win = wins[i]; if ($.cookie(win) == "show") { $(win).show(); } else if ($.cookie(win) == "hide") { $(win).hide(); } } function format(prod) { return "\"img\"
" + prod.name; } $("#word").autocomplete('http://www.cenzi.pl', { minChars: 3, width: 400, selectFirst: false, max: 10, scrollHeight: 400, dataType: "json", parse: function(data) { return $.map(data, function(row) { return { data: row, value: row.name, result: row.name } }); }, formatItem: function(item) { return format(item); } }); $('#smail').bt({ fill: 'darkred', cssStyles: {color: 'white', fontWeight: 'bold', width: 'auto'}, positions: ['bottom'] }); $('#rebatecode').bt({ fill: 'darkred', cssStyles: {color: 'white', fontWeight: 'bold', width: 'auto'} }); }); function winroll(win) { if ($(win).is(":hidden")) $.cookie(win, 'show', { expires: 3 }); else $.cookie(win, 'hide', { expires: 3 }); $(win).slideToggle(700, "easeOutBounce"); } /* window.onscroll = scrollEvent; function scrollEvent() { st = document.body.scrollTop; $('body').css("background-position-y", "-" + st + "px"); } */ function changeInputType(oldObject, oType) { var newObject = document.createElement('input'); newObject.type = oType; if(oldObject.size) newObject.size = oldObject.size; if(oldObject.onkeypress) newObject.onkeypress = oldObject.onkeypress; if(oldObject.value) newObject.value = oldObject.value; if(oldObject.name) newObject.name = oldObject.name; if(oldObject.id) newObject.id = oldObject.id; if(oldObject.className) newObject.className = oldObject.className; oldObject.parentNode.replaceChild(newObject,oldObject); return newObject; } function Top() { window.scroll(0,0); } function Tip(what, text) { $(what).bt(text, { trigger: 'load', positions: ['bottom'], width: 400, fill: 'darkred', cssStyles: {color: 'white', fontWeight: 'bold', width: 'auto'}, showTip: function(box){ var $content = $('.bt-content', box).hide(); var $canvas = $('canvas', box).hide(); var origWidth = $canvas[0].width; var origHeight = $canvas[0].height; $(box).show(); $canvas.css({width: origWidth * .5, height: origHeight * .5, left: origWidth * .25, top: origHeight * .25, opacity: .1}).show().animate({width: origWidth, height: origHeight, left: 0, top: 0, opacity: 1}, 500, 'easeOutBounce', function(){$content.show(); } );},hideTip: function(box, callback){ $(box).animate({opacity: 0}, 500, callback); }, shrinkToFit: true, hoverIntentOpts: { interval: 0, timeout: 0 }}); $.scrollTo($(what), 500, {queue:true}); $(what).delay('500').queue(function() { $(this).btOn();}); } function Tip2(what, info) { $(what).bt({ fill: 'darkred', cssStyles: {color: 'white', fontWeight: 'bold', width: 'auto'}, contentSelector: "$('#cartinfo')", positions: ['bottom'], hoverIntentOpts: { interval: 0, timeout: 0 }}); } function Goto(href) { window.location.href = href; } function CreateBookmarkLink(url,title) { if (window.sidebar) { window.sidebar.addPanel(title, url,""); } if (window.external) { window.external.AddFavorite( url, title); } if ((window.opera) && (window.print)) { return true; } } function IsValidObject(objToTest) { if (objToTest == null || objToTest == undefined) { return false; } return true; } function SubmitForm(formname) { var form = document.getElementById(formname); if (IsValidObject(form)) { form.submit(); } } function ShowOrderDetails(oid) { var visibility =document.getElementById('secOrderDetails'+oid).style.visibility; xajax_ShowOrderDetails(visibility,oid); } $(document).ready(function(){ $('div[id*="secOrderDetails"]').each(function() { $(this).hide(); }); $('a[id*="orderlnk"]').toggle(function(){ var orderid = $(this).attr('id'); var oid = orderid.replace("orderlnk", ""); if ($("#secOrderDetails"+oid).is(":hidden")) { $("#secOrderDetails"+oid).slideDown('slow'); } else { $("#secOrderDetails"+oid).slideUp('slow'); } },function(){ var orderid = $(this).attr('id'); var oid = orderid.replace("orderlnk", ""); if ($("#secOrderDetails"+oid).is(":visible")) { $("#secOrderDetails"+oid).slideUp('slow'); } else { $("#secOrderDetails"+oid).slideDown('slow'); } }); $("#sizetablelnk").css("cursor","pointer"); $("#sizetablelnk").toggle(function(){ $(this).html("[ » ]"); $("#sizetable").hide('slow'); },function(){ $(this).html("[ « ]"); $("#sizetable").show('fast'); }); $('img[id*="thumb"]').mouseenter(function(){ var imgfilename = $(this).attr('title'); $('#imgcontainer').empty(); $('#imgcontainer').append(''); $('#imgcontainer').hide(); $('#imgcontainer').fadeIn("slow"); var title = $(this).attr('title'); var aprev = $('a[class="aprev"]'); aprev.attr("href",title); aprev.attr("id",title); }); $('img[id="goTop"]').click(function() { $(window).scrollTo( {top:'0px', left:'0px'}, 800 ); }); $('.thumb').hover(function() { }); }); function ShowPDF(pdffilename) { window.open(pdffilename, "", "width=800px, height=600px, resizable"); } function checkEnter(e){ var characterCode; if(e && e.which){ //if which property of event object is supported (NN4) e = e characterCode = e.which //character code is contained in NN4's which property } else{ e = event characterCode = e.keyCode //character code is contained in IE's keyCode property } if(characterCode == 13){ //if generated character code is equal to ascii 13 (if enter key) return false } else{ return true } } function getElementsByClassName(cn){ var arr = new Array(); var els = document.getElementsByTagName("*"); var exp= new RegExp("^(.* )?"+cn+"( .*)?$", "g"); for (var i = 0; i < els.length; i++ ){ if (exp.test(els[i].className)){ arr.push(els[i]); } } return arr; } function ShowPicture(imgthumbfilename,imgfilename) { var picprev = document.getElementById('imgshow'); var aprev = getElementsByClassName('aprev'); picprev.src = imgthumbfilename; aprev[0].href = imgfilename; aprev[0].id = imgfilename; } function ShowCriteria(criteria) { document.getElementById('secCriteria').innerHTML = criteria; } function Goto(url) { document.location.href=url; } var thumbnailviewer={ enableTitle: false, //Should "title" attribute of link be used as description? enableAnimation: true, //Enable fading animation? definefooter: '
Zamknij
', //Define HTML for footer interface defineLoading: 'Moment...', //Define HTML for "loading" div /////////////No need to edit beyond here///////////////////////// scrollbarwidth: 16, opacitystring: 'filter:progid:DXImageTransform.Microsoft.alpha(opacity=10); -moz-opacity: 0.1; opacity: 0.1', targetlinks:[], //Array to hold links with rel="thumbnail" createthumbBox:function(){ //write out HTML for Image Thumbnail Viewer plus loading div document.write('
'+this.definefooter+'
') document.write('
'+this.defineLoading+'
') this.thumbBox=document.getElementById("thumbBox") this.thumbImage=document.getElementById("thumbImage") //Reference div that holds the shown image this.thumbLoading=document.getElementById("thumbLoading") //Reference "loading" div that will be shown while image is fetched this.standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body //create reference to common "body" across doctypes }, centerDiv:function(divobj){ //Centers a div element on the page var ie=document.all && !window.opera var dom=document.getElementById var scroll_top=(ie)? this.standardbody.scrollTop : window.pageYOffset var scroll_left=(ie)? this.standardbody.scrollLeft : window.pageXOffset var docwidth=(ie)? this.standardbody.clientWidth : window.innerWidth-this.scrollbarwidth var docheight=(ie)? this.standardbody.clientHeight: window.innerHeight var docheightcomplete=(this.standardbody.offsetHeight>this.standardbody.scrollHeight)? this.standardbody.offsetHeight : this.standardbody.scrollHeight //Full scroll height of document var objwidth=divobj.offsetWidth //width of div element var objheight=divobj.offsetHeight //height of div element var topposition=(docheight>objheight)? scroll_top+docheight/2-objheight/2+"px" : scroll_top+10+"px" //Vertical position of div element: Either centered, or if element height larger than viewpoint height, 10px from top of viewpoint divobj.style.left=docwidth/2-objwidth/2+"px" //Center div element horizontally divobj.style.top=Math.floor(parseInt(topposition))+"px" divobj.style.visibility="visible" }, showthumbBox:function(){ //Show ThumbBox div this.centerDiv(this.thumbBox) if (this.enableAnimation){ //If fading animation enabled this.currentopacity=0.1 //Starting opacity value this.opacitytimer=setInterval("thumbnailviewer.opacityanimation()", 20) } }, loadimage:function(link){ //Load image function that gets attached to each link on the page with rel="thumbnail" if (this.thumbBox.style.visibility=="visible") //if thumbox is visible on the page already this.closeit() //Hide it first (not doing so causes triggers some positioning bug in Firefox var imageHTML='' //Construct HTML for shown image if (this.enableTitle && link.getAttribute("title")) //Use title attr of the link as description? imageHTML+='
'+link.getAttribute("title") this.centerDiv(this.thumbLoading) //Center and display "loading" div while we set up the image to be shown this.thumbImage.innerHTML=imageHTML //Populate thumbImage div with shown image's HTML (while still hidden) this.featureImage=this.thumbImage.getElementsByTagName("img")[0] //Reference shown image itself this.featureImage.onload=function(){ //When target image has completely loaded thumbnailviewer.thumbLoading.style.visibility="hidden" //Hide "loading" div thumbnailviewer.showthumbBox() //Display "thumbbox" div to the world! } if (document.all && !window.createPopup) //Target IE5.0 browsers only. Address IE image cache not firing onload bug: panoramio.com/blog/onload-event/ this.featureImage.src=link.getAttribute("href") this.featureImage.onerror=function(){ //If an error has occurred while loading the image to show thumbnailviewer.thumbLoading.style.visibility="hidden" //Hide "loading" div, game over } }, setimgopacity:function(value){ //Sets the opacity of "thumbimage" div per the passed in value setting (0 to 1 and in between) var targetobject=this.featureImage if (targetobject.filters && targetobject.filters[0]){ //IE syntax if (typeof targetobject.filters[0].opacity=="number") //IE6 targetobject.filters[0].opacity=value*100 else //IE 5.5 targetobject.style.filter="alpha(opacity="+value*100+")" } else if (typeof targetobject.style.MozOpacity!="undefined") //Old Mozilla syntax targetobject.style.MozOpacity=value else if (typeof targetobject.style.opacity!="undefined") //Standard opacity syntax targetobject.style.opacity=value else //Non of the above, stop opacity animation this.stopanimation() }, opacityanimation:function(){ //Gradually increase opacity function this.setimgopacity(this.currentopacity) this.currentopacity+=0.1 if (this.currentopacity>1) this.stopanimation() }, stopanimation:function(){ if (typeof this.opacitytimer!="undefined") clearInterval(this.opacitytimer) }, closeit:function(){ //Close "thumbbox" div function this.stopanimation() this.thumbBox.style.visibility="hidden" this.thumbImage.innerHTML="" this.thumbBox.style.left="-2000px" this.thumbBox.style.top="-2000px" }, cleanup:function(){ //Clean up routine on page unload this.thumbLoading=null if (this.featureImage) this.featureImage.onload=null this.featureImage=null this.thumbImage=null for (var i=0; i ').find('a').css({ left:parseInt($(this).offset().left)+864,top:parseInt($(this).offset().top)+1 }).click(function(){ $(this).siblings('div.tml').slideToggle(); return false; }).focus(function(){this.blur();}); }); }); var slider={ num:-1, cur:0, cr:[], al:null, at:slidertime*1000, ar:true, init:function(){ if(!slider.data || !slider.data.length) return false; var d=slider.data; slider.num=d.length; var pos=Math.floor(Math.random()*1);//slider.num); for(var i=0;i'+(i+1)+''); } $('img,div#slide-controls',$('div#slide-holder')).fadeIn(); slider.text(d[pos]); slider.on(pos); slider.cur=pos; window.setTimeout('slider.auto();',slider.at); }, auto:function(){ if(!slider.ar) return false; var next=slider.cur+1; if(next>=slider.num) next=0; slider.slide(next); }, slide:function(pos){ if(pos<0 || pos>=slider.num || pos==slider.cur) return; window.clearTimeout(slider.al); slider.al=window.setTimeout('slider.auto();',slider.at); var d=slider.data; for(var i=0;i | 2007-09-07 if(!window.SI){var SI={};}; SI.Files={ htmlClass:'SI-FILES-STYLIZED', fileClass:'file', wrapClass:'cabinet', fini:false, able:false, init:function(){ this.fini=true; }, stylize:function(elem){ if(!this.fini){this.init();}; if(!this.able){return;}; elem.parentNode.file=elem; elem.parentNode.onmousemove=function(e){ if(typeof e=='undefined') e=window.event; if(typeof e.pageY=='undefined' && typeof e.clientX=='number' && document.documentElement){ e.pageX=e.clientX+document.documentElement.scrollLeft; e.pageY=e.clientY+document.documentElement.scrollTop; }; var ox=oy=0; var elem=this; if(elem.offsetParent){ ox=elem.offsetLeft; oy=elem.offsetTop; while(elem=elem.offsetParent){ ox+=elem.offsetLeft; oy+=elem.offsetTop; }; }; }; }, stylizeAll:function(){ if(!this.fini){this.init();}; if(!this.able){return;}; } };