$(document).ready(function(){
	
	if (flnm != "index_home")
	{
		$("#red").treeview({
			animated: "fast",
			collapsed: true,
			unique: true,
			persist: "cookie",
			toggle: function() {
				window.console && console.log("%o was toggled", this);
			}
		});
	}
	
	 $("ul.dropdown li").hover(function(){
    
        $(this).addClass("hover");
        $('ul:first',this).css('visibility', 'visible');
    
    }, function(){
    
        $(this).removeClass("hover");
        $('ul:first',this).css('visibility', 'hidden');
    
    });
    
    $("ul.dropdown li ul li:has(ul)").find("a:first").append(" &raquo; ");


	$('#customer_service').click(function() {
		var divmenu = $(this).next("div");
		
		if($('#my_account').next("div").is(":visible"))
		{
			$('#my_account').next("div").hide();
		}
		 
		if(divmenu.is(':visible'))
		{
			divmenu.hide();
		}
		else
		{
			divmenu.show();
		}
	}).mouseenter(function()
	{
		if($('#my_account').next("div").is(":visible"))
		{
			$('#my_account').next("div").hide();
		}
	});
	
	$('#my_account').click(function() {
		var divmenu = $(this).next("div");
		
		if($('#customer_service').next("div").is(":visible"))
		{
			$('#customer_service').next("div").hide();
		}
		 
		if(divmenu.is(':visible'))
		{
			divmenu.hide();
		}
		else
		{
			divmenu.show();
		}
	}).mouseenter(function()
	{
		if($('#customer_service').next("div").is(":visible"))
		{
			$('#customer_service').next("div").hide();
		}
	});

	$("#cus_ser").mouseenter(function()
	{
		$(this).show();
    }).mouseleave(function(){
		$(this).hide();
    });
    
    $("#my_acc").mouseenter(function(){
		$(this).show();
    }).mouseleave(function(){
		$(this).hide();
    });

});

$(document).bind("contextmenu",function(e){
	alert ('2011 All Copyright © reserved by Royisal');
    return false;
});

