$(document).ready(function(){
						   
	
	 $(".TopNavIn li").hover(function(){
	   ItemWidth = ($('.TopNavIn',this).parent().width());
	   $('.TopNavIn',this).css('margin-left', ItemWidth+'px');
	 });
	 
	/* $(".TopNav li").hover(function(){
		$('.TopNavIn',this).css('visibility', 'visible');
	 },function(){
	   $('.TopNavIn',this).css('visibility', 'hidden');
	 });*/
	
});

function OpenMenu(GetThis)
{
	
	var Toggle = $(GetThis).parent().children('ul').css("display");
	if (Toggle=="block"){		
		$(GetThis).removeClass("current");
		$(GetThis).parent().children('ul').hide(800);
	}else{
		$(GetThis).addClass("current");
		$(GetThis).parent().children('ul').show(800);
	}
	
}

function socialIco(id)
{
    
    //var s_title = encodeURI("ADIM ADIM");
   	var s_title = $('h3').html();
    
    var s_url = encodeURI(window.location);
    
    var w_bar;
    var w_url = "";
    s_title = encodeURIComponent(s_title);
    s_url = encodeURIComponent(s_url);
    if (id == 0)
    {
        w_url = "http://www.facebook.com/sharer.php?t=" + s_title + "&amp;u=" + s_url;
        w_bar = "height=400, width=600, titlebar=no, status=no, toolbar=no, menubar=no, location=no, resizable=no, scrollbars=1"
    }
    else if (id == 1)
    {
        w_url = "http://twitter.com/home?status=" + s_title + "\n "+ s_url +" &amp;url=" + s_url;
        w_bar = "height=400, width=800, titlebar=no, status=no, toolbar=no, menubar=no, location=no, resizable=no, scrollbars=1"
    }
    else if (id == 2)
    {
        w_url = "http://friendfeed.com/share/bookmarklet/frame#title=" + s_title + "&amp;url=" + s_url;
        w_bar = "height=400, width=800, titlebar=no, status=no, toolbar=no, menubar=no, location=no, resizable=no, scrollbars=1"
    }
    window.open(w_url.replace(/amp;/gi, ""), "", w_bar, w_url);
}
