$(document).ready(function(){
						   // Featured Content Tabs
			$(".tab_content").hide(); //Hide all content
			$("ul.tabs li:first").addClass("active").show(); //Activate first tab
			$(".tab_content:first").show(); //Show first tab content
		
			//On Click Eventpar
			$("ul.productdetail_tabs li").click(function() {
		
				$("ul.productdetail_tabs li").removeClass("active"); //Remove any "active" class
				$(this).addClass("active"); //Add "active" class to selected tab
				$(".tab_content").hide(); //Hide all tab content
		
				var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
				$(activeTab).fadeIn(); //Fade in the active ID content
				return false;
            });


            //On Click Eventpar
            $("ul.sellyourcoin_tabs li").click(function () {

                $("ul.sellyourcoin_tabs li").removeClass("active"); //Remove any "active" class
                $(this).addClass("active"); //Add "active" class to selected tab
                $(".tab_content").hide(); //Hide all tab content

                var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
                $(activeTab).fadeIn(); //Fade in the active ID content
                return false;
            });



			
			$('#btn_cart, #btn_closecart').click(function () {
					$('#_miniCart').slideToggle();
					return false;
				});

	        $('#btn_bullion, #btn_worldcoinnav, #btn_ira, #btn_marketnews, #btn_about').hoverIntent(
												function () {
													$(".container_dropdown", this).show();
												},
												function () {
													$(".container_dropdown", this).hide();
												});
				$('#btn_modern').hoverIntent(
												function () {
													$(".container_dropdown", this).show();
													var largestHeight = $("#column1").height();
													$("#column2").height(largestHeight);
													//alert(largestHeight);
												},
												function () {
													$(".container_dropdown", this).hide();
												});
				
				$('#btn_resources').hoverIntent(
												function () {
													$(".container_dropdown", this).show();
													var largestHeight = $("#usmints").height();
													$(".nav_column", this).height(largestHeight);
													//alert(largestHeight);
												},
												function () {
													$(".container_dropdown", this).hide();
												});
				
				$(function () {
					
					
					$('#btn_modern .dropdown_links li.tier1_links:nth-child(4n+1)').each(function (index, item) {
						var nextLi = $(item).next();
						var followingLi = $(nextLi).next('li');
						var lastLi = $(followingLi).next('li');
						$(item).wrap("<div class='nav_column' id='column" + index + "'></div>");
						$("#column" + index).append(nextLi).append(followingLi).append(lastLi);
						
					});
					function largestHeight() {
						var tallest = 0;
						$(this).children().each(function() {
							var thisHeight = $(this).height();
							if(thisHeight > tallest) {
								tallest = thisHeight;
							}
						});	
						//alert(tallest);
						$("#column2").height(tallest);	
					}
					var largestHeight = $("#column1").height();
					//alert(largestHeight);
					//$("#column2").height(largestHeight);
					//largestHeight();
				});
	});
