jQuery(document).ready(function($) { //DISABLE RIGHT-CLICK ON IMGS $('body').bind('contextmenu', function(e){ alert('© Nadine Nemec and Optimized Interiors, 2017. Unauthorized use and/or duplication of this material without express and written permission from this site’s author and/or owner is strictly prohibited. Excerpts and links may be used, provided that full and clear credit is given to Nadine Nemec and Optimized Interiors with appropriate and specific direction to the original content.'); return false; }); });//END DOC READY //CUSTOMIZE HOMEPAGE JUMBOTRON HEADER jQuery('h2 .jumbotron-heading-inner').each(function() { var word = jQuery(this).html(); var index = word.indexOf(' '); if(index == -1) { index = word.length; } jQuery(this).html('' + word.substring(0, index) + '' + word.substring(index, word.length)); //jQuery(this).html('' + word.substring(0, index) + '' + '' + word.substring(index, word.length) + ''); // ANIMATE LOGO jQuery("h2 .jumbotron-heading-inner").delay(500).animate({opacity: 1}, 1000 ); }); //INSERT SUPERSCRIPT WRAP FOR TM REG, COPYRIGHT TAGS jQuery('body :not(script)').contents().filter(function() { return this.nodeType === 3; }).replaceWith(function() { return this.nodeValue.replace(/[™®©]/g, '$&'); }); // ADD CUSTOM SCROLLING TO SLIDESHOW ALL THUMBNAILS var speed = 0; var scroll = 0; var container = jQuery('.carousel-thumbs'); var container_w = container.width(); var max_scroll = container[0].scrollWidth - container.outerWidth(); container.on('mousemove', function(e) { var mouse_x = e.pageX - container.offset().left; var mouseperc = 100 * mouse_x / container_w; speed = mouseperc - 80; }).on ( 'mouseleave', function() { speed = 0; }); function updatescroll() { if (speed !== 0) { scroll += speed / 5; if (scroll < 0) scroll = 0; if (scroll > max_scroll) scroll = max_scroll; jQuery('.carousel-thumbs').scrollLeft(scroll); } window.requestAnimationFrame(updatescroll); } window.requestAnimationFrame(updatescroll); //ADD ANIMATED L / R ARROWS: DESKTOP jQuery('body.is-desktop .uxi-slideshow .carousel-inner-wrap').after('
'); jQuery('body.is-desktop .uxi-slideshow .carousel-inner-wrap').after('
'); //ADD DESKTOP TEXT jQuery('body.is-desktop .uxi-slideshow .carousel-inner-wrap').after('

Hover left and right to view all thumbnails.

'); //ADD ANIMATED L / R ARROWS: MOBILE jQuery('body.is-phone .uxi-slideshow .carousel-inner-wrap').after('
'); //ADD MOBILE TEXT jQuery('body.is-tablet .uxi-slideshow .carousel-inner-wrap').after('

Swipe up to view all thumbnails.

'); jQuery('body.is-phone .uxi-slideshow .carousel-inner-wrap').after('

Swipe up to view all thumbnails.

'); //ADD PLAY/PAUSE BTNS TO CAROUSEL jQuery(".carousel .carousel-control-wrap.left").before("
"); //ADD PLAY/PAUSE FUNCTIONALITY jQuery(function () { jQuery('.carousel').carousel({ pause: "false" }); jQuery('#playButton').click(function () { jQuery('.carousel').carousel('cycle'); }); jQuery('#pauseButton').click(function () { jQuery('.carousel').carousel('pause'); }); });