/**
 * Scripting for the demo page
 */

(function ($) {

	'use strict';

	// Set document class "js"
	document.documentElement.className += 'js';


	/*
	 * Set height for tabbed area
	 */
	$(document).on('click', '.content-tabbed > h3', function () {
		var height = $(this).next().height() + $(this).height();

		$(this).parent().height(height);

		$(this).parent().children('.is-active').removeClass('is-active');
		$(this).addClass('is-active');
	});


	/*
	 * On hash change
	 */
	$(window).on('hashchange', function () {
		var hash = location.hash.replace('!', '');

		if ($(hash).hasClass('tab-content-anchor')) {
			setTimeout(function () {
				$(hash).trigger('click');
			});
		}
	});

	if (location.hash) {
		$(window).trigger('hashchange');
	} else {
		$('.content-tabbed > h3:first').trigger('click');

		// Scroll to top
		window.scrollTo(0, 1);
	}

	/*
	 * On closing the modal, stop video
	 */

	$(document)
		.on('cssmodal:hide', function () {
			var $video = $('.semantic-content iframe');
			var source = $video.attr('src');

			$video.attr('src', '').attr('data-src', source);
		})

		.on('cssmodal:show', function () {
			var $video = $('.semantic-content iframe');
			if ($video.attr('data-src') !== '') {
				$video.attr('src', $video.attr('data-src')).attr('data-src', '');
			}
		});

}(jQuery));

@@ -554,16 +554,17 @@
 eplace('
+#
 !', '');
@@ -568,15 +568,22 @@
 ');%0A
-%0A
 %09%09if (
+hash && 
 $(ha
@@ -1014,16 +1014,57 @@
 %0A%09%09%09var 
+source;%0A%0A%09%09%09if ($video.length %3E 0) %7B%0A%09%09%09%09
 source =
@@ -1085,16 +1085,17 @@
 src');%0A%0A
+%09
 %09%09%09$vide
@@ -1138,16 +1138,21 @@
 ource);%0A
+%09%09%09%7D%0A
 %09%09%7D)%0A%0A%09%09
@@ -1236,24 +1236,45 @@
 e');%0A%09%09%09if (
+$video.length %3E 0 && 
 $video.attr(

Check if video is available on page and check if hash is !== ''