/**
*	Config 1
*	Site-specific configuration settings for Highslide JS
*/
hs.graphicsDir = '/js/highslide/graphics/';
hs.showCredits = false;
hs.creditsPosition = 'bottom right';
hs.outlineType = 'custom';
hs.dimmingOpacity = 0.5;
hs.fadeInOut = true;
hs.align = 'center';
hs.captionEval = 'this.a.title';
hs.headingEval = 'this.thumb.title';
hs.headingOverlay.width = '100%';
hs.registerOverlay({
	html: '<div class="closebutton" onclick="return hs.close(this)" title="Close"></div>',
	position: 'top left',
	useOnHtml: true,
	fade: 2 // fading the semi-transparent overlay looks bad in IE
});



// Add the slideshow controller
hs.addSlideshow({
	slideshowGroup: 'group1',
	interval: 5000,
	repeat: false,
	useControls: true,
	fixedControls: 'fit',
	overlayOptions: {
		opacity: '0.75',
		position: 'bottom center',
		offsetX: '1',
		offsetY: '50',
		hideOnMouseOut: false
	}
});

hs.transitions = ['expand', 'crossfade'];

// gallery config object
var config1 = {
	slideshowGroup: 'group1',
	transitions: ['expand', 'crossfade']
};


$(document).ready(function(){
	$("a.no-caption").click(function(){
		return hs.expand(this,{ captionEval: '' });
	});
	$("a.video-link").click(function(){
		var flv = $(this).attr('title');
		/*var preview_img = $(this).find('img').attr('src');*/
		
		return hs.htmlExpand(this,{ 
			captionEval: '',
			objectType: 'swf', 
			width: 448, 
			objectWidth: 448, 
			objectHeight: 272, 
			preserveContent: false, 
			wrapperClassName: 'no-footer titlebar no-header', 
			allowSizeReduction: false, 
			maincontentText: 'You need to upgrade your Flash player', 
			headingText: 'Video', 
			swfOptions: {
				flashvars: {
					file:flv,
					autostart:'true',
					controlbar:'bottom',
					icons:'false',
					dock:'true'
					/*image:preview_img*/
				},
				params: {
					allowfullscreen: 'true',
					allowscriptaccess: 'sameDomain',
					wmode: 'opaque'
				}
			}
		});
	});
	$("a.link-360").click(function() {
		return hs.htmlExpand(this,{ 
			captionEval: '', 
			objectType: 'swf', 
			width: 747, 
			objectWidth: 747, 
			objectHeight: 530, 
			preserveContent: false, 
			wrapperClassName: 'no-footer titlebar no-header', 
			allowSizeReduction: false, 
			maincontentText: 'You need to upgrade your Flash player', 
			headingText: '360 View' 
		});
	});
	$("a.you-tube").click(function() {
    $(this).attr('href',$(this).attr('href') + '?rel=0&amp;wmode=transparent&amp;autoplay=1');
		return hs.htmlExpand(this,{ 
			captionEval: '', 
			objectType: 'iframe',
            objectLoadTime: 'after', 
			width: 640, 
			objectWidth: 640, 
			objectHeight: 390, 
			preserveContent: false, 
			wrapperClassName: 'no-footer titlebar no-header', 
			allowSizeReduction: false, 
			maincontentText: 'You need to upgrade your Flash player', 
			headingText: 'Video' 
			
			
		});
	});
	$("a.iframe-loader").click(function() {
    $(this).attr('href',$(this).attr('href'));
		return hs.htmlExpand(this,{ 
			captionEval: '', 
			objectType: 'iframe',
            objectLoadTime: 'after', 
			width: 650, 
			objectWidth: 650, 
			objectHeight: 550, 
			preserveContent: false, 
			wrapperClassName: 'no-footer titlebar no-header', 
			allowSizeReduction: false, 
			maincontentText: 'You need to upgrade your Flash player'
			
			
		});
	});
});





