// main menu
$(document).ready(function(){



/* Main Menu */
  $(".center ul.menu li").hover(function(){   
     $(this).addClass("hover");
  $('ul:first',this).css('dispaly', 'block');
  $('ul:first',this) .slideDown({duration: 300 , easing: 'easeInOutCubic'});
   }, function(){
  	  $(".center ul.menu li").mouseout(function () {
  $('ul:first',this).css('dispaly', 'none');
  });
       $(this).removeClass("hover");
       $('ul:first',this).css('display', 'none');
 });
  $(".center ul.menu li ul li a:has(ul)").find("a:first").append(" &raquo; ");


// Register Tab ..
$("#searchButton").click(function(){

    if($('#after_head_section .register').css("display") == "none"){
  $('#after_head_section .register').css('dispaly', 'block');
  $('#after_head_section .login').slideUp();
  $("#after_head_section .register").slideDown({duration: 800 , easing: 'easeInOutCubic'});

}else{
  $('#after_head_section .register').css('dispaly', 'none');
   $('#after_head_section .login').slideUp();
  $("#after_head_section .register").slideUp({duration: 800 , easing: 'easeInOutCubic'});
}
});

$("#loginButton").click(function(){

    if($('#after_head_section .login').css("display") == "none"){
   $('#after_head_section .register').slideUp();
  $('#after_head_section .login').css('dispaly', 'block');
  $("#after_head_section .login").slideDown({duration: 800 , easing: 'easeInOutCubic'});

}else{
    $('#after_head_section .register').slideUp();
  $('#after_head_section .login').css('dispaly', 'none');
  $("#after_head_section .login").slideUp({duration: 800 , easing: 'easeInOutCubic'});
}
});
	
// tool tip
$(".more-vedios-show, .site_last_art,  #social-comment a, .nav-previous a, .nav-next a, .gallery-icon a , .tooltip ,.image-slid a, .btn-submit , #footer .left, .widget a , #loginForm span a, .logoutptn , .tooltip,  .tagcloud a , .widget-archive a , .home-page-icon, .widget_archive a , .read-more a, .post-title a , .meta a , .sociallinks a, #fixeduser a").tipTip({maxWidth: "auto", edgeOffset: 3});
$(".index-post a, .footer_stats div, .jcarousel-skin-tango a").tipTip({maxWidth: "200px", edgeOffset: 3, defaultPosition:"bottom"});
// Comment Tabs 
		$( "#commenttabs" ).tabs({
			cookie: {
				// store cookie for a day, without, it would be a session cookie
				expires: 360
			}
		});
// back to top
	// hide #back-top first
	$("#back-top").hide();
	
	// fade in #back-top
	$(function () {
		$(window).scroll(function () {
			if ($(this).scrollTop() > 100) {
				$('#back-top').fadeIn();
			} else {
				$('#back-top').fadeOut();
			}
		});

		// scroll body to 0px on click
		$('#back-top a').click(function () {
			$('html,body').animate({
				scrollTop: 0
			}, 800);
			return false;
		});
	});

});


// good bye .. 