// Avoid `console` errors in browsers that lack a console. if (!(window.console && console.log)) { (function() { var noop = function() {}; var methods = ['assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error', 'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log', 'markTimeline', 'profile', 'profileEnd', 'markTimeline', 'table', 'time', 'timeEnd', 'timeStamp', 'trace', 'warn']; var length = methods.length; var console = window.console = {}; while (length--) { console[methods[length]] = noop; } }()); } (function ($) { "use strict"; $(function(){ $(window).scroll(function() { var top = $(window).scrollTop(); if ( top > ( $('#header').height() ) ) { $('body').addClass('scrolled'); } else { $('body').removeClass('scrolled'); } }); $(document) .on('click', function(e) { if ( $(this).is( '[data-toggle]' ) === false ) { $('[data-toggled]').each(function(e) { if ( $(this).hasClass( $(this).attr('data-toggled') ) ) { $(this).toggleClass( $(this).attr('data-toggled') ); $(this).removeAttr('data-toggled'); } }); } }) .on('click', '[data-toggle][href="#"]', function(e) { e.stopPropagation(); e.preventDefault(); var $target = $(this).closest( $(this).data('toggle') ), class_name = ( $(this).data('toggle-class') ) ? $(this).data('toggle-class') : 'toggled-in'; $target.toggleClass( class_name ); if ( $target.hasClass( class_name ) ) { $target.attr('data-toggled', class_name ); var $input = $target.find('input'); if ( $input.size() > 0 ) { $input[0].focus(); } } else { $target.removeAttr('data-toggled'); } if ( $( '.subnav-tabbed-panel:first', $target ).size() > 0 ) { $( '.subnav-tabbed-panel:first img[data-src]', $target ).unveil(); } var $siblings = $target.siblings('.' + class_name ); $siblings.find( '.' +class_name ).toggleClass(class_name).removeAttr('data-toggled'); $siblings.toggleClass( class_name ).removeAttr( 'data-toggled' ); }) .on('mouseover', '[data-toggle][href="#"]', function(e) { var $target = $(this).closest( $(this).data('toggle') ), class_name = ( $(this).data('toggle-class') ) ? $(this).data('toggle-class') : 'toggled-in', $siblings = $target.siblings('.' + class_name ); $siblings.find( '.' +class_name ).toggleClass(class_name).removeAttr('data-toggled'); $siblings.toggleClass( class_name ).removeAttr( 'data-toggled' ); }) .on( 'click', '.js-stoppropagation', function(e) { e.stopPropagation(); }) .on('click', '.js .collapsible-widgets .widget-title', function(e) { if ( $(this).closest('.widget').hasClass('active') ) { $(this).closest('.widget').removeClass('active'); } else { $(this).closest('.widget').addClass('active').siblings().removeClass('active'); } $(window).trigger('scroll'); }) .on('mouseover', '.subnav-tabbed-tabs a', function(e) { e.preventDefault(); $(this).closest('li').addClass('active').siblings().removeClass('active'); $( $(this).attr('href') ).addClass('active').siblings().removeClass('active'); $('img[data-src]', $(this).attr('href') ).unveil(); }) .on('mouseover', '.full-subnav-wrapper', function(e) { if ( $( '.subnav-tabbed-panel:first', $(this) ).size() > 0 ) { $( '.subnav-tabbed-panel:first img[data-src]', $(this) ).unveil(); } }) .on('click', '.nav-tabs a', function (e) { e.preventDefault(); $(this).tab('show'); }); $('.js .collapsible-widgets .widget:first .widget-title').trigger('click'); $('#brand img[data-src]').unveil(); $('#main img[data-src]').unveil(200, function() { $(this).load(function() { this.style.opacity = 1; }); }); $(window).trigger('scroll'); $('.carousel').carousel(); $('a[data-rel^="prettyPhoto"]').each(function () { $(this).attr('rel', $(this).data('rel') ); }); $("a[rel^='prettyPhoto']").prettyPhoto({ animation_speed: 'fast', /* fast/slow/normal */ slideshow: 5000, /* false OR interval time in ms */ autoplay_slideshow: false, /* true/false */ opacity: 0.80, /* Value between 0 and 1 */ show_title: true, /* true/false */ allow_resize: true, /* Resize the photos bigger than viewport. true/false */ default_width: 500, default_height: 344, counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */ theme: 'dark_square', /* light_rounded / dark_rounded / light_square / dark_square / facebook */ horizontal_padding: 5, /* The padding on each side of the picture */ hideflash: false, /* Hides all the flash object on a page, set to TRUE if flash appears over prettyPhoto */ wmode: 'opaque', /* Set the flash wmode attribute */ autoplay: true, /* Automatically start videos: True/False */ modal: false, /* If set to true, only the close button will close the window */ deeplinking: true, /* Allow prettyPhoto to update the url to enable deeplinking. */ overlay_gallery: true, /* If set to true, a gallery will overlay the fullscreen image on mouse over */ keyboard_shortcuts: true, /* Set to false if you open forms inside prettyPhoto */ changepicturecallback: function(){}, /* Called everytime an item is shown/changed */ callback: function(){}, /* Called when prettyPhoto is closed */ ie6_fallback: true, markup: '
\
 
\
\
\
\
\
\
\
\
\
\
\
\
\ \ \
\
\ \ \
\
\
\

\
\
\
\
\
\
\
\
\
\
\
\
\
', gallery_markup: '', image_markup: '', flash_markup: '', quicktime_markup: '', iframe_markup: '', inline_markup: '
{content}
', custom_markup: '', social_tools: '
' /* html or false to disable */ }); }); })(window.jQuery);