1// JavaScript Document 2 3// Input Fields 4setInputs = function() { 5 $(':input[title]').each(function() { 6 var $this = $(this); 7 if($this.val() === '') { 8 $this.val($this.attr('title')); 9 $this.addClass('watermark'); 10 } 11 $this.focus(function() { 12 if($this.val() === $this.attr('title')) { 13 $this.val(''); 14 $this.removeClass('watermark'); 15 } 16 }); 17 $this.blur(function() { 18 if($this.val() === '') { 19 $this.val($this.attr('title')); 20 $this.addClass('watermark'); 21 } 22 }); 23 }); 24} 25 26// Show-Hide Tabs 27setTabs = function() { 28 $("#tabs .content").hide(); 29 $($("#tabs ul.titles .active").attr("href")).show(); 30 $("#tabs ul.titles li a").on("click",function(){ 31 $("#tabs ul.titles li a").removeClass("active"); 32 $(this).addClass("active"); 33 $("#tabs .content").hide(); 34 $($(this).attr("href")).show(); 35 return false; 36 }); 37} 38 39// Set Cells width 40setCells = function() { 41 $("#brands li a").width("auto"); 42 $("#brands li a").width($("#brands li").width()); 43 $("#adverts .photo img").width("auto"); 44 $("#adverts .photo img").width($("#adverts .photo").width()); 45 $("#product .bigphoto a").width("auto"); 46 $("#product .bigphoto a").width($("#product .bigphoto").width()); 47} 48 49// get touch ability 50function isTouchDevice() { 51 return (('ontouchstart' in window) 52 || (navigator.MaxTouchPoints > 0) 53 || (navigator.msMaxTouchPoints > 0)); 54} 55 56// Touchscreen 57function setTouchscreen() { 58 // Navigation 59 $("#navigation ul > li > div").each(function(){ 60 $(this).prev().on("click",function(){ 61 return false; 62 }) 63 }) 64 // Acount box 65 $(".acountbox ul li.acount > a, .acountbox ul li.more > a").on("click",function(){ 66 return false; 67 }) 68} 69 70$(document).ready(function() { 71 // Functions 72 if (isTouchDevice() == true) { 73 $("body").addClass("is-touch"); 74 setTouchscreen(); 75 } else { 76 $("body").addClass("no-touch"); 77 } 78 setInputs(); 79 setCells(); 80 setTabs(); 81 82 // Carousels 83 $("#owl-mainbanner").owlCarousel({ 84 singleItem: true, 85 autoPlay: 5000, 86 navigation: true, 87 pagination: true, 88 autoHeight : true, 89 responsive: true 90 }); 91 $("#owl-brands").owlCarousel({ 92 items: 5, 93 autoPlay: 5000, 94 navigation: true, 95 pagination: false, 96 responsive: true, 97 itemsDesktop: [1000,5], 98 itemsDesktopSmall: [979,5], 99 itemsTablet: [768,4], 100 itemsTabletSmall: [600,4], 101 itemsMobile : [450,2] 102 }); 103 $("#tabs ul.products").owlCarousel({ 104 items: 4, 105 scrollPerPage: true, 106 autoPlay: false, 107 navigation: true, 108 pagination: false, 109 responsive: true, 110 itemsDesktop: [1000,4], 111 itemsDesktopSmall: [979,4], 112 itemsTablet: [768,3], 113 itemsTabletSmall: [600,2], 114 itemsMobile : [400,1] 115 }); 116 117}); 118 119$(window).resize(function() { 120 setCells(); 121}); 122 123$(window).load(function() { 124 // Functions 125 setCells(); 126});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.