jQuery.noConflict();

jQuery(document).ready(function(){

	jQuery('.highlighted-product').live("click", function(){
		window.location = jQuery(this).find('.producturl').attr("href");
		return false;
	});
	jQuery('.highlighted-product:first').addClass('first');
	
	jQuery('.producturl:first > .highlighted-product').css('border-left', '1px #ccc solid');
	if(jQuery('.highlighted-product').prevAll('.highlighted-product').length == 0) {
		jQuery(this).find('.highlighted-product').addClass("first");
	}
	jQuery('.highlighted-product:last').addClass('last')
	jQuery('#subMenu li:first').addClass('first');
	
	if(jQuery('#subMenu li').size() == 0){
		jQuery('#subMenu').css('display','none');	
	}
	
	jQuery('.highlighted-product').hover(function(){
		hasImg = jQuery(this).children().find('.popupImage img') 
		if(hasImg.length > 0){
			jQuery(this).find('.productPopup').css('background','transparent url('+hasImg.attr('src')+') no-repeat 0 0');
		}	
	});
	
	if(jQuery('.shopping-cart-totals').html() != null) {
		var viewCart = jQuery('#shopleft');
		
		jQuery('#content').empty();
		jQuery('#content').html(viewCart);
	}
	
	if(jQuery(window).width() < 1200) {
		jQuery('.last > .productPopup').css('left', '-110px');
	}
 
});