1/*------------------------------------------------------------------------- 2 3 Theme Name: Cutting Edge 4 5-------------------------------------------------------------------------*/ 6 7$(document).ready(function () { 8 /*vars used throughout*/ 9 var wh, 10 scrollSpeed = 1000, 11 parallaxSpeedFactor = 0.6, 12 scrollEase = 'easeOutExpo', 13 targetSection, 14 sectionLink = 'a.navigateTo', 15 section = $('.section'); 16 17 18//INIT--------------------------------------------------------------------------------/ 19 if (isMobile == true) { 20 $('.header').addClass('mobileHeader'); //add mobile header class 21 $('.statGrid').addClass('statGridMobile'); 22 } else { 23 $('.page').addClass('desktop'); 24 $('.parallax').addClass('fixed-desktop'); 25 } 26 27 28//MENU --------------------------------------------------------------------------------/ 29 $(".menu a").click(function () { 30 $("html, body").animate({ 31 scrollTop: $($(this).attr("href")).offset().top + "px" 32 }, { 33 duration: 1000, 34 easing: "swing" 35 }); 36 return false; 37 }); 38 39//Hover Directional--------------------------------------------------------------------/ 40 $(function() { 41 $('.da-thumbs > article').hoverdir(); 42 }); 43 44 45//PARALLAX ----------------------------------------------------------------------------/ 46 $(window).bind('load', function () {
47 parallaxInit(); 48 }); 49 50 function parallaxInit() { 51 if (isMobile == true) return false; 52 $('#parallax-1').parallax(); 53 $('#parallax-2').parallax(); 54 $('#parallax-3').parallax(); 55 $('#parallax-4').parallax(); 56 $('#parallax-5').parallax(); 57 $('#parallax-6').parallax(); 58 $('.imageClip').parallax(); 59 /*add as necessary*/ 60 } 61 62 63//HOMEPAGE SPECIFIC -----------------------------------------------------------------/ 64 function sliderHeight() { 65 wh = $(window).height(); 66 $('#homepage').css({height: wh}); 67 } 68 sliderHeight(); 69 70 71//FORM PLACEHOLDER -----------------------------------------------------------------/ 72 $(".formField").focus(function(){ 73 if($(this).val()==$(this).attr('title')){ 74 $(this).val(''); 75 } 76 }); 77 $(".formField").blur(function(){ 78 if($(this).val()==''){ 79 $(this).val($(this).attr('title')); 80 } 81 }); 82 $(".formField").blur(); 83 84 85// Accordion ------------------------------------------------------------------------/ 86 87 (function () { 88 89 var $container = $('.accContainer'), 90 $trigger = $('.accTrigger'); 91 fullWidth = $container.outerWidth(true); 92 93 $container.hide(); 94 $trigger.first().addClass('active').next().show(); 95 96 $trigger.css('width', fullWidth - 2); 97 $container.css('width', fullWidth - 2); 98 99 $trigger.on('click', function (e) { 100 if ($(this).next().is(':hidden') ) { 101 $trigger.removeClass('active').next().slideUp(300); 102 $(this).toggleClass('active').next().slideDown(300); 103 } 104 e.preventDefault(); 105 }); 106 107 // Resize 108 $(window).on('resize', function () { 109 fullWidth = $container.outerWidth(true) 110 $trigger.css('width', $trigger.parent().width()); 111 $container.css('width', $container.parent().width()); 112 }); 113 114 })(); 115 116// SUPERSIZED SLIDESHOW -----------------------------------------------------------------/ 117 $.supersized({ 118 119 // Functionality 120 slideshow : 1, // Slideshow on/off 121 autoplay : 1, // Slideshow starts playing automatically 122 start_slide : 1, // Start slide (0 is random) 123 stop_loop : 0, // Pauses slideshow on last slide 124 random : 0, // Randomize slide order (Ignores start slide) 125 slide_interval : 5000, // Length between transitions 126 transition : 2, // 0-None, 1-Fade, 2-Slide Top, 3-Slide Right, 4-Slide Bottom, 5-Slide Left, 6-Carousel Right, 7-Carousel Left 127 transition_speed : 600, // Speed of transition 128 new_window : 1, // Image links open in new window/tab 129 pause_hover : 0, // Pause slideshow on hover 130 keyboard_nav : 1, // Keyboard navigation on/off 131 performance : 1, // 0-Normal, 1-Hybrid speed/quality, 2-Optimizes image quality, 3-Optimizes transition speed // (Only works for Firefox/IE, not Webkit) 132 image_protect : 1, // Disables image dragging and right click with Javascript 133 134 // Size & Position 135 min_width : 0, // Min width allowed (in pixels) 136 min_height : 0, // Min height allowed (in pixels) 137 vertical_center : 1, // Vertically center background 138 horizontal_center : 1, // Horizontally center background 139 fit_always : 0, // Image will never exceed browser width or height (Ignores min. dimensions) 140 fit_portrait : 1, // Portrait images will not exceed browser height 141 fit_landscape : 0, // Landscape images will not exceed browser width 142 143 // Components 144 slide_links : 'blank', // Individual links for each slide (Options: false, 'num', 'name', 'blank') 145 thumb_links : 0, // Individual thumb links for each slide 146 thumbnail_navigation : 0, // Thumbnail navigation 147 slides : [ // Slideshow Images 148 {image : './images/slider/image1.jpg', 149 title : '<h2><span>Bakery</span> Delights</h2>', 150 thumb : '', 151 url : '' 152 }, 153 154 {image : './images/slider/image3.jpg', 155 title : '<h2><span>Quality</span> and Value</h2>', 156 thumb : '', 157 url : '' 158 }, 159 160 {image : './images/slider/image2.jpg', 161 title : '<h2><span>Your Trusted</span> Source</h2>', 162 thumb : '', 163 url : '' 164 }, 165 166 {image : './images/slider/image4.jpg', 167 title : '<h2><span>Customized</span> Products</h2>', 168 thumb : '', 169 url : '' 170 }, 171 172 {image : './images/slider/image5.jpg', 173 title : '<h2><span>Indulgent</span> Desserts</h2>', 174 thumb : '', 175 url : '' 176 } 177 ], 178 179 // Theme Options 180 progress_bar : 0, // Timer for each slide 181 mouse_scrub : 0 182 183 }); 184 185 186 187//WINDOW EVENTS ---------------------------------------------------------------------/ 188 189 $(window).bind('resize',function () { 190 191 //Update slider height 192 sliderHeight(); 193 194 }); 195 196});
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.