jQuery(document).ready(function(){
	 //START SITE SPECIFIC FUNCTIONS HERE//
	 
	 jQuery('#footlinks').makeacolumnlists({cols:3,colWidth:164,equalHeight:0,startN:1});
	 
	 jQuery(".tab_content").hide(); //Hide all content
	jQuery("ul.tabs li:first").addClass("active").show(); //Activate first tab
	jQuery(".tab_content:first").show(); //Show first tab content
	
	//On Click Event
	jQuery("ul.tabs li").click(function() {
		jQuery("ul.tabs li").removeClass("active"); //Remove any "active" class
		jQuery(this).addClass("active"); //Add "active" class to selected tab
		jQuery(".tab_content").hide(); //Hide all tab content
		var activeTab = jQuery(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content
		jQuery(activeTab).fadeIn(); //Fade in the active content
		return false;

	});
	 
	 

//TopDrop functions
jQuery(".submenu").hide();
			jQuery('#topnav li a').click(function(){
				var navitem = jQuery(this).attr("class");
				var navdrop = "." + navitem + 'drop';
				
				jQuery(navdrop).hide();
				
				if ( jQuery(navdrop).is(':visible') ) {
					
        			jQuery(".submenu").hide();

						}
				else{
					jQuery(".submenu").hide();
					jQuery(navdrop).fadeIn("fast",function(){
								//alert('function here');
									jQuery('#navigation').mouseout(function(event) {
																	  
										 if (jQuery(event.relatedTarget).is('#navigation')) {
											jQuery(navdrop).fadeOut(500);
											
										}
										
										});
									
									
									
								 });
												}
						
						
						
				});
			jQuery(".entry a").attr("target", "_blank");


});
