// JavaScript Document

/* POPUP BOX - WARNING FOR INTERNET EXPLORER 6 USERS */

// SuperBGImage options
$.fn.superbgimage.options = {
	randomtransition: 0, // 0-none, 1-use random transition (0-7)
	slideshow: 0, // 0-none, 1-autostart slideshow
	slide_interval: 3000, // interval for the slideshow
	randomimage: 0, // 0-none, 1-random image
	speed: 'slow' // animation speed
};

	// initialize SuperBGImage
	$('#thumbs').superbgimage().hide();

// Start these functions when the page is loaded

$(function() {
if ( $.browser.msie && $.browser.version == 6 )  { 
  	$("#popupBox").modal({ overlay:20, overlayCss: {backgroundColor:"#333"} });
}		   

/*
if ( ! $.cookie("first_time") ){ // Als er geen cookie is met de key "first_time", voer dan dit uit! 
	$("#menuCarousel > #flashCarousel").css('display','none');
		setTimeout(function() {
 	$("#newCollection").fadeOut(1300);
	}, 6000);

	if ($("#menuCarousel > #flashCarousel").css('display') == 'none') {
    	setTimeout(function() {
    		$("#menuCarousel > #flashCarousel").fadeIn(500);
    	}, 6000);
	} 
} else { 
	$("#newCollection").css('display','none')
};

$.cookie("first_time", "true", { expires : 1 }) // Plaats een cookie bij het eerste bezoek, hierdoor zal er de komende 24 uur geen banner van de nieuwe collectie getoond worden bij bezoek.
*/

if($('a.preview').length){
	$('a.preview').imgPreview({
		containerID: 'imgPreviewWithStyles',
		imgCSS: {
			// Limit preview size:
			height: 200
		},
		// When container is shown:
		onShow: function(link){
			$('<span>' + $(link).text() + '</span>').appendTo(this);
		},
		// When container hides: 
		onHide: function(link){
			$('span', this).remove();
		}
	}); 
}

});
