$(document).ready(function(){
	// By default, product video code is hidden. We only show it if javascript is enabled.
	if($("div.videosubcontainer").size()) {
		$("div.subcontainer").addClass("subcontainer-narrow");
		$("div.videosubcontainer").show();
	}
	
	// For the joint lightbox (images/video) we specify the "current" param. By default it says
	// "Image {current} of {total}", which is obviously no good when videos are shown
	
	$("a.imagelightbox").colorbox({
		current: '{current} of {total}'
	});
	
	// Inline parameter tells colorbox to load content from existing page. This allows us to use
	// iframe embed code in a lightbox. We simply put it on the page (hidden) and then use inline.
	
	$("a.videolightbox").colorbox({
		inline: true,
		current: '{current} of {total}'
	});

});
