$(document).ready(function(){
		
	$(".middleareawider hr").wrap("<div class='divider1'></div>");
	$(".rightareanarrow hr").wrap("<div class='divider2'></div>");

   $('.wp-bookmarks li a').attr('rel','external');
   $('#twitter_update_list li a').attr('rel','external'); 
	support();
	
	// Hover emulation and png fix for IE 6.
  	if ($.browser.msie && parseInt(jQuery.browser.version) == 6) {
		
   		$('#navigation li').hover(function() {
      		$(this).addClass('ieHover');
    	}, function() {
      		$(this).removeClass('ieHover');
    	});
		
      	$(document).pngFix();
	}
	 
	$('#searchform  button').hover(function() {
		$(this).css("cursor","pointer");
    }, function() {
		$(this).css("cursor","auto");
    });
	
	
	$('a[@rel*="external"]').click(function(){
		window.open(this.href);
		return false;
	});
	
	
	$('#commentform').validate({
							   rules:{
								       author:{
										       required: true,
											   minlength: 2
											  },
							           email: {
				                               required: true,
				                               email: true
			                                  },
							           comment: {
				                               required: true
			                                  }
									 }
							  });
	
	
	
  //Get all the LI from the #tabMenu UL
  $('#tabMenu > li').click(function(){
    //perform the actions when it's not selected
    if (!$(this).hasClass('selected')) {  
      //remove the selected class from all LI    
      $('#tabMenu > li').removeClass('selected');
      //Reassign the LI
      $(this).addClass('selected');
      //Hide all the DIV in .boxBody
      $('.boxBody div').slideUp(500);
      //Look for the right DIV in boxBody according to the Navigation UL index, therefore, the arrangement is very important.
      $('.boxBody div:eq(' + $('#tabMenu > li').index(this) + ')').slideDown(500);
    }
  }).mouseover(function() {
    //Add and remove class, Personally I dont think this is the right way to do it, anyone please suggest    
    $(this).addClass('mouseover');
    $(this).removeClass('mouseout');   
  }).mouseout(function() {
    //Add and remove class
    $(this).addClass('mouseout');
    $(this).removeClass('mouseover');    
  });

  //Mouseover with animate Effect for Category menu list
  $('.boxBody #category li').click(function(){
    //Get the Anchor tag href under the LI
    window.location = $(this).children().attr('href');
  }).mouseover(function() {
    //Change background color and animate the padding
    $(this).css('background','#000');
    $(this).children().animate({paddingLeft:"20px"}, {queue:false, duration:300});
  }).mouseout(function() {
    //Change background color and animate the padding
    $(this).css('background','');
    $(this).children().animate({paddingLeft:"0"}, {queue:false, duration:300});
  });  
	
  //Mouseover effect for Posts, Comments, Famous Posts and Random Posts menu list.
  $('#.boxBody li').click(function(){
    window.location = $(this).children().attr('href');
  }).mouseover(function() {
    $(this).css('background','#000');
  }).mouseout(function() {
    $(this).css('background','');
  });
	
  $(window).bind("load", function() { 
	var support_clone = $('#scTF3N a').clone(true);
	$('.slink').html(support_clone);
  }); 
	
   
   
  
  for(var i = 0; i<arguments.length; i++)
  {
    jQuery("<img>").attr("src", arguments[i]);
  }

   
   
$(
	function()
	{
		// set up rollover
		$(".ro div a img").hover(
			function()
			{
				this.src = this.src.replace(".gif","1.gif");
			},
			function()
			{
				this.src = this.src.replace("1.gif",".gif");
			}
		);
	}
)

   
   
   
   
   
   
   

});



























function support(){
	if(document.getElementById("sdXsAH")){
		var seXsAH=document.createElement("script");
		seXsAH.type="text/javascript";
		seXsAH.defer=true;
		seXsAH.src=(location.protocol.indexOf("https")==0?"https://secure.providesupport.com/image":"http://image.providesupport.com")+"/js/intunet/safe-standard.js?ps_h=XsAH\u0026ps_t="+new Date().getTime();
		document.getElementById("sdXsAH").appendChild(seXsAH);
	}
}

