try {
 document.execCommand('BackgroundImageCache', false, true);
} catch(e) {}

this.tooltip = function(){	
	/* CONFIG */		
		xOffset = 10;
		yOffset = 20;		
		// these 2 variable determine popup's distance from the cursor
		// you might want to adjust to get the right result		
	/* END CONFIG */		
	$("span.tooltip").hover(function(e){											  
		this.t = this.title;
		this.title = "";									  
		$("body").append("<p id='tooltip'>"+ this.t +"</p>");
		$("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("fast");		
    },
	function(){
		this.title = this.t;		
		$("#tooltip").remove();
    });	
	$("a.tooltip").mousemove(function(e){
		$("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});			
};

this.screenshotPreview = function(){	
	/* CONFIG */
		
		xPOffset = 150;
		yPOffset = -440;
		
		// these 2 variable determine popup's distance from the cursor
		// you might want to adjust to get the right result
		
	/* END CONFIG */
	$("a.screenshot").hover(function(e){
		this.t = this.title;
		this.title = "";	
		var c = (this.t != "") ? "<br/>" + this.t : "";
		$("body").append("<p id='sspreview'><img src='"+ this.rel +"' alt='wait...' />"+ c +"</p>");								 
		$("#sspreview")
			.css("top",(e.pageY - xPOffset) + "px")
			.css("left",(e.pageX + yPOffset) + "px")
			.fadeIn("fast");						
    },
	function(){
		this.title = this.t;	
		$("#sspreview").remove();
    });	
	$("a.screenshot").mousemove(function(e){
		$("#sspreview")
			.css("top",(e.pageY - xPOffset) + "px")
			.css("left",(e.pageX + yPOffset) + "px");
	});			
};

jQuery.preload = function(){
	jQuery.each (arguments,function (e){
		jQuery ('<img src="' + this + '" />');
	});
}

$(document).ready(function(){
	$.preload('/img/layout/login_button_on.png');
	
	$('#menus').accordion({
		header: 'div.menu-handle',
		event: 'mouseover',
		navigation: true,
		fillspace: true,
		autoHeight: false,
		active: false
	});
	$('.menu-content a').hover(
		function(){
			$(this).animate({paddingLeft:"15px"}, 300);
		},
		function(){
			$(this).animate({paddingLeft:"0px"}, 300);
		}
	);
	
	$('#jadwalwar').innerfade({
		speed: 'slow',
		timeout: 5000,
		type: 'sequence'
	});
	
	tooltip();
	//$('form').attr("AutoComplete", "off");
});

$(window).load(function(){
	$('#loginbutton').hover(
		function(){ $(this).attr("src","/img/layout/login_button_on.png");},
		function(){ $(this).attr("src","/img/layout/login_button_off.png");}
	)
	swfobject.embedSWF("/img/layout/iklan/indomog.swf", "indomog", "145", "58", "9.0.0", "/img/layout/expressInstall.swf",{},{wmode:"opaque"},{style:"margin: 10px 0 0 15px"});
	// swfobject.embedSWF("/img/layout/header/flash.swf", "natal", "402", "250", "9.0.0", "/img/layout/expressInstall.swf",{},{wmode:"transparent"});
});
var RecaptchaOptions = {theme : 'clean'};