1jQuery(document).ready(function(){ 2 3 // Top Slider Min Height 4 jQuery('.gdl-top-slider').each(function(){ 5 var min_height = jQuery(this).siblings('.header-area-wrapper').height(); 6 7 jQuery(this).css('min-height', min_height); 8 }); 9 10 // Search Default text 11 jQuery('.search-text input').live("blur", function(){ 12 var default_value = jQuery(this).attr("data-default"); 13 if (jQuery(this).val() == ""){ 14 jQuery(this).val(default_value); 15 } 16 }).live("focus", function(){ 17 var default_value = jQuery(this).attr("data-default"); 18 if (jQuery(this).val() == default_value){ 19 jQuery(this).val(""); 20 } 21 }); 22 23 // Package Search 24 jQuery('.package-search-wrapper input').live("blur", function(){ 25 var default_value = jQuery(this).attr("data-default"); 26 if (jQuery(this).val() == ""){ 27 jQuery(this).val(default_value); 28 } 29 }).live("focus", function(){ 30 var default_value = jQuery(this).attr("data-default"); 31 if (jQuery(this).val() == default_value){ 32 jQuery(this).val(""); 33 } 34 }); 35 jQuery('#package-searchform').submit(function(){ 36 jQuery(this).find('input').each(function(){ 37 if( jQuery(this).attr('name') == 's' ){ 38 if( jQuery(this).val() == jQuery(this).attr('data-default') ){ 39 jQuery(this).val(' '); 40 } 41 }else if( jQuery(this).val() == "" || jQuery(this).val() == jQuery(this).attr('data-default') ){ 42 jQuery(this).attr("disabled", "disabled"); 43 }else{ 44 jQuery(this).removeAttr("disabled"); 45 } 46 }); 47 jQuery(this).find('select').each(function(){ 48 if(jQuery(this).prop("selectedIndex") == 0){ 49 jQuery(this).attr("disabled", "disabled"); 50 }else{ 51 jQuery(this).removeAttr("disabled"); 52 } 53 }); 54 }); 55 56 // Package Search Combobox 57 if (!jQuery.browser.opera) { 58 jQuery('select[name="package-type"]').each(function(){ 59 var title = jQuery(this).attr('title'); 60 if( jQuery('option:selected', this).val() != '' ) title = jQuery('option:selected',this).text(); 61 jQuery(this) 62 .css({'z-index':10,'opacity':0,'-khtml-appearance':'none'}) 63 .after('<span class="select-package-type">' + title + '</span>') 64 .change(function(){ 65 val = jQuery('option:selected',this).text(); 66 jQuery(this).next().text(val); 67 }) 68 }); 69 }; 70 71 // Title Item Gimmick 72 jQuery('.title-item-wrapper').each(function(){ 73 var page_width = jQuery(this).find('.title-item-header').width(); 74 var title_width = jQuery(this).find('.title-item-header span').width(); 75 jQuery(this).children('.title-item-gimmick').width(((page_width-title_width)/2) - 20); 76 }); 77 78 // Top search 79 jQuery(".top-search-wrapper").find("#searchsubmit").click(function(){ 80 if( parseInt(jQuery(this).siblings("#search-text").width()) == 1 ){ 81 jQuery(this).siblings("#search-text").children("input[type='text']").val(''); 82 jQuery(this).siblings("#search-text").children().css('display', 'block'); 83 jQuery(this).siblings("#search-text").animate({ width: 174 }); 84 jQuery(this).siblings("#search-text").children("input[type='text']").focus(); 85 return false; 86 } 87 if( jQuery(this).siblings("#search-text").children("input[type='text']").val() == '' ){ 88 return false; 89 } 90 }); 91 jQuery("#searchform").click(function(){ 92 if (event.stopPropagation){ 93 event.stopPropagation(); 94 } 95 else if(window.event){ 96 window.event.cancelBubble=true; 97 } 98 //event.stopPropagation(); 99 }); 100 jQuery("html").click(function(){ 101 jQuery(this).find(".top-search-wrapper").find("#search-text").animate({ width: '1px' }, function(){ 102 jQuery(this).children().css('display', 'none'); 103 }); 104 }); 105 106 // Social Hover 107 jQuery("#gdl-social-icon .social-icon").hover(function(){ 108 jQuery(this).animate({ opacity: 0.55 }, 150); 109 }, function(){ 110 jQuery(this).animate({ opacity: 1 }, 150); 111 }); 112 113 // Accordion 114 var gdl_accordion = jQuery('ul.gdl-accordion'); 115 gdl_accordion.children('li').not('.active').each(function(){ 116 jQuery(this).children('.accordion-content').css('display', 'none'); 117 }); 118 gdl_accordion.children('li').click(function(){ 119 if( !jQuery(this).hasClass('active') ){ 120 jQuery(this).addClass('active').children('.accordion-content').slideDown(); 121 jQuery(this).siblings('li').removeClass('active').children('.accordion-content').slideUp(); 122 } 123 }); 124 125 // Toggle Box 126 var gdl_toggle_box = jQuery('ul.gdl-toggle-box'); 127 gdl_toggle_box.children('li').not('.active').each(function(){ 128 jQuery(this).children('.toggle-box-content').css('display', 'none'); 129 }); 130 gdl_toggle_box.children('li').children('.toggle-box-title').click(function(){ 131 var cur_toggle = jQuery(this).parent(); 132 if( cur_toggle.hasClass('active') ){ 133 cur_toggle.removeClass('active').children('.toggle-box-content').slideUp(); 134 }else{ 135 cur_toggle.addClass('active').children('.toggle-box-content').slideDown(); 136 } 137 }); 138 139 // Tab 140 var gdl_tab = jQuery('div.gdl-tab'); 141 gdl_tab.find('.gdl-tab-title li a').click(function(e){ 142 if( jQuery(this).hasClass('active') ) return; 143 144 var data_tab = jQuery(this).attr('data-tab'); 145 var tab_title = jQuery(this).parents('ul.gdl-tab-title'); 146 var tab_content = tab_title.siblings('ul.gdl-tab-content'); 147 148 // tab title 149 tab_title.find('a.active').removeClass('active'); 150 jQuery(this).addClass('active'); 151 152 // tab content 153 tab_content.children('li.active').removeClass('active').css('display', 'none'); 154 tab_content.children('li[data-tab="' + data_tab + '"]').fadeIn().addClass('active'); 155 156 e.preventDefault(); 157 }); 158 159 // Scroll Top 160 jQuery('div.scroll-top').click(function() { 161 jQuery('html, body').animate({ scrollTop:0 }, { duration: 600, easing: "easeOutExpo"}); 162 return false;
163 }); 164 165 // Blog Hover 166 jQuery(".blog-media-wrapper.gdl-image img, .port-media-wrapper.gdl-image img, .gdl-gallery-image img").hover(function(){ 167 jQuery(this).animate({ opacity: 0.55 }, 150); 168 }, function(){ 169 jQuery(this).animate({ opacity: 1 }, 150); 170 }); 171 172 // Port Hover 173 jQuery(".portfolio-item").each(function(){ 174 jQuery(this).hover(function(){ 175 var thumbnail_hover = jQuery(this).find('a.hover-wrapper'); 176 var thumbnail_overlay_hover = thumbnail_hover.children(); 177 178 thumbnail_overlay_hover.fadeIn(200); 179 }, function(){ 180 var thumbnail_hover = jQuery(this).find('a.hover-wrapper'); 181 var thumbnail_overlay_hover = thumbnail_hover.children(); 182 183 thumbnail_overlay_hover.fadeOut(200); 184 }); 185 }); 186 187 // JW Player Responsive 188 responsive_jwplayer(); 189 function responsive_jwplayer(){ 190 jQuery('[id^="jwplayer"][id$="wrapper"]').each(function(){ 191 var data_ratio = jQuery(this).attr('data-ratio'); 192 if( !data_ratio || data_ratio.length == 0 ){ 193 data_ratio = jQuery(this).height() / jQuery(this).width(); 194 jQuery(this).css('max-width', '100%'); 195 jQuery(this).attr('data-ratio', data_ratio); 196 } 197 jQuery(this).height(jQuery(this).width() * data_ratio); 198 }); 199 } 200 jQuery(window).resize(function(){ 201 responsive_jwplayer(); 202 }); 203 204 // Date Picker 205 if (jQuery.fn.datepicker) { 206 jQuery('.gdl-date-picker').datepicker({ 207 dateFormat: "yy-mm-dd" 208 }); 209 } 210}); 211jQuery(window).load(function(){ 212 213 // Menu Navigation 214 jQuery('#main-superfish-wrapper ul.sf-menu').supersubs({ 215 minWidth: 14.5, maxWidth: 27, extraWidth: 1 216 }).superfish({ 217 delay: 400, speed: 'fast', animation: {opacity:'show',height:'show'} 218 }); 219 220 // Menu Navigation 221 var float_menu = jQuery('div.floating-nav-wrapper'); 222 var header_area = jQuery('div.header-outer-wrapper'); 223 float_menu.css('display','block'); 224 float_menu.children('ul.sf-menu').supersubs({ 225 minWidth: 14.5, maxWidth: 27, extraWidth: 1 226 }).superfish({ 227 delay: 400, speed: 'fast', animation: {opacity:'show',height:'show'}, 228 onInit: function(){ float_menu.css('display', 'none'); } 229 }); 230 231 jQuery(window).scroll(function(){ 232 if( jQuery(window).width() > 959 ){ 233 var cur_pos = jQuery(this).scrollTop(); 234 var header_height = header_area.outerHeight(); 235 236 if( cur_pos > header_height ){ 237 float_menu.slideDown(200); 238 }else{ 239 float_menu.slideUp(200); 240 } 241 } 242 }); 243 244 // Personnal Item Height 245 function set_personnal_height(){ 246 jQuery(".personnal-item-holder .row").each(function(){ 247 var max_height = 0; 248 jQuery(this).find('.personnal-item').height('auto'); 249 jQuery(this).find('.personnal-item-wrapper').each(function(){ 250 if( max_height < jQuery(this).height()){ 251 max_height = jQuery(this).height(); 252 } 253 }); 254 jQuery(this).find('.personnal-item').height(max_height); 255 }); 256 } 257 set_personnal_height(); 258 259 // Price Table Height 260 function set_price_table_height(){ 261 jQuery(".price-table-wrapper .row").each(function(){ 262 var max_height = 0; 263 jQuery(this).find('.best-price').removeClass('best-active'); 264 jQuery(this).find('.price-item').height('auto'); 265 jQuery(this).find('.price-item-wrapper').each(function(){ 266 if( max_height < jQuery(this).height()){ 267 max_height = jQuery(this).height(); 268 } 269 }); 270 jQuery(this).find('.price-item').height(max_height); 271 jQuery(this).find('.best-price').addClass('best-active'); 272 }); 273 } 274 set_price_table_height(); 275 276 // Filter portfolio hover bar 277 jQuery('ul.portfolio-item-filter').each(function(){ 278 var left_pos = jQuery(this).find('.active').position().left; 279 var bar_width = jQuery(this).find('.active').width(); 280 281 jQuery(this).siblings('.port-current-bar').css({ 'width': bar_width, 'left': left_pos }); 282 }); 283 jQuery('ul.portfolio-item-filter li').hover(function(){ 284 var left_pos = jQuery(this).children('a').position().left; 285 var bar_width = jQuery(this).children('a').width(); 286 287 jQuery(this).parent('ul').siblings('.port-current-bar').animate( 288 { 'width': bar_width, 'left': left_pos }, 289 { duration: 200, queue: false } 290 ); 291 }, function(){ 292 var active_tab = jQuery(this).parent('ul').find('a.active'); 293 var left_pos = active_tab.position().left; 294 var bar_width = active_tab.width(); 295 296 jQuery(this).parent('ul').siblings('.port-current-bar').animate( 297 { 'width': bar_width, 'left': left_pos }, 298 { duration: 200, queue: false } 299 ); 300 }); 301 302 // Navigation Sliding Bar 303 var main_navigation = jQuery('.header-wrapper #main-superfish-wrapper'); 304 var sliding_bar = main_navigation.siblings('.gdl-current-menu'); 305 var sf_menu = main_navigation.children('ul.sf-menu'); 306 var current_bar = sf_menu.children('.current_page_item, .current_page_ancestor, .current-page-item, .current-page-ancestor'); 307 var has_current_bar = true; 308 if( !current_bar.length ){ 309 //current_bar = jQuery('body.single-package #menu-item-3798'); 310 if( !current_bar.length ){ 311 current_bar = sf_menu.children().filter(':first'); 312 has_current_bar = false;
313 } 314 } 315 function init_navigation_sliding_bar(){ 316 // sliding bar width 317 var left_pos = current_bar.position().left + parseInt(current_bar.css('padding-left')); 318 319 if( has_current_bar ){ 320 sliding_bar.css({ 'width':current_bar.width(), 'left': left_pos }); 321 }else{ 322 sliding_bar.css({ 'width':0, 'left': left_pos }); 323 } 324 } 325 326 init_navigation_sliding_bar(); 327 sf_menu.children().hover(function(){ 328 var left_pos = jQuery(this).position().left + parseInt(jQuery(this).css('padding-left')); 329 330 sliding_bar.animate({ 'width':jQuery(this).width(), 'left': left_pos}, 331 { queue: false, easing: 'easeOutQuad', duration: 250 }); 332 },function(){ 333 var left_pos = current_bar.position().left + parseInt(current_bar.css('padding-left')); 334 335 if( has_current_bar ){ 336 sliding_bar.animate({ 'width':current_bar.width(), 'left': left_pos }, 337 { queue: false, easing: 'easeOutQuad', duration: 250 }); 338 }else{ 339 sliding_bar.animate({ 'width':0, 'left': left_pos }, 340 { queue: false, easing: 'easeOutQuad', duration: 250 }); 341 } 342 343 }); 344 345 // Set Portfolio Max Height 346 function set_portfolio_height(){ 347 jQuery('div.portfolio-item-holder').each(function(){ 348 var context_height = 0; 349 jQuery(this).find('.portfolio-context').css({'height': 'auto'}); 350 jQuery(this).find('.portfolio-context').each(function(){ 351 if( context_height < jQuery(this).height()){ 352 context_height = jQuery(this).height(); 353 } 354 }); 355 jQuery(this).find('.portfolio-context').css({'height': context_height}); 356 357 var max_height = 0; 358 jQuery(this).children('.portfolio-item').height('auto'); 359 jQuery(this).children('.portfolio-item').each(function(){ 360 if( max_height < jQuery(this).height()){ 361 max_height = jQuery(this).height(); 362 } 363 }); 364 jQuery(this).children('.portfolio-item').height(max_height); 365 }); 366 } 367 setTimeout(function(){ set_portfolio_height(); }, 100); 368 369 // Slider Nav 370 set_fullwidth_sliderNav(); 371 function set_fullwidth_sliderNav(){ 372 var header_outer = jQuery('.header-outer-wrapper'); 373 if( header_outer.hasClass('full-slider') ){ 374 var margin_val = (header_area.children('.header-area-wrapper').height() / 2) - 38; 375 var top_slider_nav = jQuery('div.gdl-top-slider').find('.nivo-directionNav a, .flex-direction-nav a, a.ls-nav-prev, a.ls-nav-next'); 376 377 top_slider_nav.css({'margin-top': margin_val}); 378 } 379 } 380 381 // When window resize, set all function again 382 jQuery(window).resize(function(){ 383 set_personnal_height(); 384 set_price_table_height(); 385 init_navigation_sliding_bar(); 386 set_portfolio_height(); 387 set_fullwidth_sliderNav(); 388 }); 389 390}); 391
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.