﻿
jQuery(document).ready(function () {

	jQuery('#cssdropdown div.headlink').hover(function () { jQuery('div', this).slideDown("fast"); }, function () { jQuery('div', this).slideUp("fast"); });

	jQuery('#module').cycle({
		before: function (curr, next, opts) { CheckModuleStatus(opts.currSlide); },
		autostop: 0,
		random: 1,
		fx: 'fade'
	});

	if (BrowserDetect.OS.indexOf("Windows") > -1 && BrowserDetect.browser.indexOf("Explorer") > -1 && BrowserDetect.version == "6") {
		jQuery(".headlink").css("background-color", "transparent");
		jQuery("#dl1").css("height", "10px");
		jQuery("#dl2").css("height", "10px");
		jQuery("#dl3").css("height", "10px");
		jQuery("#dl4").css("height", "10px");
	}

	if (BrowserDetect.OS.indexOf("Mac") > -1 && BrowserDetect.browser.indexOf("Safari") > -1) {
		jQuery(".saf").css("height", "12px");
		jQuery(".menuLinkLast").css("margin-bottom", "12px");
		jQuery("#dl1").css("height", "18px");
		jQuery("#dl2").css("height", "18px");
		jQuery("#dl3").css("height", "18px");
		jQuery("#dl4").css("height", "18px");
	}

	if (BrowserDetect.OS.indexOf("Mac") > -1 && BrowserDetect.browser.indexOf("Firefox") > -1) {
		jQuery("#dl1").css("height", "20px");
		jQuery("#dl2").css("height", "20px");
		jQuery("#dl3").css("height", "20px");
		jQuery("#dl4").css("height", "20px");
		jQuery(".saf").css("height", "13px");
	}

	jQuery('#loader').load('slideshow-container.aspx', function () { });

});


function CheckModuleStatus(currSlide) {

	if (currSlide == 4) {
		jQuery("#module-status").css({ "background-image": "url(/themes/01/images/mod-featured.jpg)" });
	} else {
		jQuery("#module-status").css({ "background-image": "url(/themes/01/images/mod-new.jpg)" });
	}

}

function PlayAgain() {
	jQuery('#loader').load('slideshow-container.aspx', function () { });
}


