$(document).ready(function(){
	
	var slideNo = 0;
	var arSize = $("#rotator div").length;
	
	$("#rotator div:not(#rotator div:eq(" + slideNo + "))").hide();
	$("#rotator .options span").html((slideNo+1) + " of " + arSize);
	
	$(".arrow").click(function(){
		slideNo += 1*$(this).attr("rel");
		
		if (slideNo == arSize) slideNo = 0;
		if (slideNo < 0) slideNo = arSize-1;
		
		$("#rotator div").fadeOut(1000);
		$("#rotator div:eq(" + slideNo + ")").fadeIn(1000);
		$("#rotator .options span").html((slideNo+1) + " of " + arSize);

		return false;
		
	});
	
	var inpVals = {};
	
	$("input").each(function(i){
		if ($(this).attr("type") != "submit") {
			inpVals[i] = $(this).val();
			$(this).focus(function(){
				if ($(this).val() == inpVals[i]) $(this).val("");
			});
			$(this).blur(function(){
				if ($(this).val() == "") $(this).val(inpVals[i]);
			});
		}
	});
	
	swfobject.embedSWF("swf/iw_tickers.swf", "ticker", "523", "125", "8.0.0", "", {wmode: 'transparent', allowScriptAccess: 'true'});
	swfobject.embedSWF("swf/instantwin_jackpot.swf", "jackpot", "297", "77", "8.0.0", "", {wmode: 'transparent', allowScriptAccess: 'true'});
	
});
