$(document).ready(function() {
	if('.long.description'){
		var description = $('.long.description').remove();			
		$('#tabs-1').append(description);
	}
	if("#tabs"){
		$("#tabs").tabs();
	}
	if("#subTabs"){
		$("#subTabs").tabs();
	}
	if('.return-policy'){
		$('.return-policy').click(function() { 
	    		$('#subTabs').tabs('select', 4); 
	    		return false;
		});
	}
	if("#delivered-fresh"){
		var currentPath = "/Customer-Service.aspx";
		if(currentPath != window.location.pathname){
			$('#delivered-fresh a').tabs({
			    select: function(event, ui) {
			        var url = $.data(ui.tab, 'load.tabs');
			        if( url ) {
			            location.href = url;
			            return false;
			        }
			        return true;
			    }
			});
		}
		else{
			$('#delivered-fresh a').click(function() { 
		    		$('#subTabs').tabs('select', 5); 
		    		return false;
			});
			
		}	
	}
	if("#properties"){
		$("#properties li").hover(
		    function(){
		        $(this).addClass('show');
		    },
		    function(){
		        $(this).removeClass('show');
		    }
		);
	}				
	$('.misc-nav a').addClass(function(){
	    var pathname = window.location.pathname;
	    var $current = $(this).attr('href')
	    if($current == pathname){
	        $(this).addClass('active')
	    }
	});
	$('.category a').addClass(function(){
	    var categoryPath = window.location.pathname + window.location.search;
	    var $current = $(this).attr('href')
	    if($current == categoryPath){
	        $(this).addClass('active')
	    }
	});	
	DD_roundies.addRule('#Home-1 a, #Technology-6 a, #FAQs-17 a,.misc-nav a', '3px 3px');
	DD_roundies.addRule('#Shop-24 a', '3px 0 0 3px');
	DD_roundies.addRule('#Kids-16 a', '0 3px 3px 0');

});
