var $j = jQuery.noConflict(); $j(document).ready(function(){ }); //colorbox $j(document).ready(function(){ $j("a[rel='galeria']").colorbox(); $j(".zadajpytanie").colorbox({width:"500px", height:"400px", iframe:true}); $j(".informujmnie").colorbox({width:"500px", height:"250px", iframe:true}); $j(".wydrukujpdf").colorbox({width:"500px", height:"500px", iframe:true}); $j(".polecznajomemu").colorbox({width:"500px", height:"290px", iframe:true}); $j(".kosztydostawy").colorbox({width:"500px", height:"500px", iframe:true}); }); // this.screenshotPreview = function(){ /* CONFIG */ xOffset = 10; yOffset = 30; // these 2 variable determine popup's distance from the cursor // you might want to adjust to get the right result /* END CONFIG */ $j(".screenshot").hover(function(e){ this.t = this.title; this.title = ""; var c = (this.t != "") ? "
" + this.t : ""; $j("body").append("

url preview"+ c +"

"); $j("#screenshot") .css("top",(e.pageY - xOffset) + "px") .css("left",(e.pageX + yOffset) + "px") .fadeIn("fast"); }, function(){ this.title = this.t; $j("#screenshot").remove(); }); $j(".screenshot").mousemove(function(e){ $j("#screenshot") .css("top",(e.pageY - xOffset) + "px") .css("left",(e.pageX + yOffset) + "px"); }); }; // starting the script on page load $j(document).ready(function(){ screenshotPreview(); }); //$j(document).ready(function() { // $j('ul.kategoria li a').hover(function() { // //mouse in // $j(this).animate({ paddingLeft: '20px' }, 400); // }, function() { // //mouse out // $j(this).animate({ paddingLeft: 0 }, 400); // }); //}); //menu hover $j(document).ready(function(){ $j("ul#koszyk li").hover(function() { //On hover... var thumbOver = $j(this).find("img").attr("src"); //Get image url and assign it to 'thumbOver' //Set a background image(thumbOver) on the <a> tag $j(this).find("a.thumb").css({'background' : 'url(' + thumbOver + ') no-repeat center bottom'}); //Fade the image to 0 $j(this).find("span").stop().fadeTo('normal', 0 , function() { $j(this).hide() //Hide the image after fade }); } , function() { //on hover out... //Fade the image to 1 $j(this).find("span").stop().fadeTo('normal', 1).show(); }); }); //tabs $j(document).ready(function(){ $j(".tab3_content").hide(); //Hide all content $j("ul.tabs3 li:first").addClass("active").show(); //Activate first tab $j(".tab3_content:first").show(); //Show first tab content $j("ul.tabs3 li").click(function() { $j("ul.tabs3 li").removeClass("active"); //Remove any "active" class $j(this).addClass("active"); //Add "active" class to selected tab $j(".tab3_content").hide(); //Hide all tab content var activeTab = $j(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content activeTab = activeTab.split("#"); //bugfixed by droope :) $j("#"+activeTab[activeTab.length-1]).fadeIn(); //Fade in the active ID content return false; }); }); //toppage $j(document).ready(function() { //$j('a[href=#top]').click(function(){ $j('#dogory').click(function(){ $j('html, body').animate({scrollTop:0}, 'slow'); return false; }); }); //fadebox $j(document).ready(function(){ $j(".rss a").hover(function(){ $j(this).next("p").animate({opacity:"show",top:"-40"},"slow"); }); }); //tablerow $j(document).ready(function() { $j('table.tablerow tbody tr:odd').addClass('odd'); $j('table.tablerow tbody tr:even').addClass('even'); }); $j(document).ready(function(){ //Hide (Collapse) the toggle containers on load $j(".toggle_container").hide(); //Switch the "Open" and "Close" state per click then slide up/down (depending on open/close state) $j("h2.toggle").click(function(){ $j(this).toggleClass("active").next().slideToggle("slow"); return false; //Prevent the browser jump to the link anchor }); }); var intervalo; function fechar(){ $j('#koszyk2').animate({ top: '-70px' }, 500, function() { // Animation complete. }); } $j(document).ready(function() { $j('#koszyk2').mouseover(function(){ clearInterval(intervalo); $j(this).animate({ top: '0px' }, 300, function() { // Animation complete. }); }); $j('#koszyk2').mouseout(function(){ intervalo = setTimeout('fechar()',500); }); }); $j(document).ready(function() { $j("#topnav li").prepend(""); //Throws an empty span tag right before the a tag $j("#topnav li").each(function() { //For each list item... var linkText = $j(this).find("a").html(); //Find the text inside of the tag $j(this).find("span").show().html(linkText); //Add the text in the tag }); $j("#topnav li").hover(function() { //On hover... $j(this).find("span").stop().animate({ marginTop: "-40" //Find the tag and move it up 40 pixels }, 250); } , function() { //On hover out... $j(this).find("span").stop().animate({ marginTop: "0" //Move the back to its original state (0px) }, 250); }); }); //filtr $j(document).ready(function() { /* see if anything is previously checked and reflect that in the view*/ $j(".checklist input:checked").parent().addClass("selected"); /* handle the user selections */ $j(".checklist .checkbox-select").click( function(event) { event.preventDefault(); $j(this).parent().addClass("selected"); $j(this).parent().find(":checkbox").attr("checked","checked"); } ); $j(".checklist .checkbox-deselect").click( function(event) { event.preventDefault(); $j(this).parent().removeClass("selected"); $j(this).parent().find(":checkbox").removeAttr("checked"); } ); }); $j(document).ready(function() { var zoom = 1.1 move = -15; $j('.zoomy').hover(function() { width = $j('.zoomy img').width() * zoom; height = $j('.zoomy img').height() * zoom; $j(this).find('img').stop(false,true).animate({'width':width, 'height':height, 'top':move, 'left':move}, {duration:300}); //$j(this).find('div.caption').stop(false,true).fadeIn(300); }, function() { $j(this).find('img').stop(false,true).animate({'width':$j('.zoomy').width(), 'height':$j('.zoomy').height(), 'top':'0', 'left':'0'}, {duration:300}); //$j(this).find('div.caption').stop(false,true).fadeOut(400); }); });