$.globals = {};

var speedFadeIn = 350;
var speedFadeOut = 400;
$(document).ready(function(){
	open_submenu();
	over_item_product();
	over_item_brands();
	over_button();
	filter_products();
	jqtabs();
});

function jqtabs(){
	$('#container_tabs').tabs();
}

function open_submenu(){
	$('#navigation ul#menu li').hover(
	function() { 
		$('ul', this).css('display', 'block');
		$('a', this).addClass("menu_over");
	},
	function() {
		$('ul', this).css('display', 'none'); 
		$('a', this).removeClass("menu_over"); 
	});
}

function over_item_product(){
	$("ul.items_products li").hover(function() {
		$('.item_image',this).stop().animate({ borderTopColor: "#559EC7",borderLeftColor: "#559EC7",borderRightColor: "#559EC7"}, {queue:false,duration:speedFadeIn});
		$('.item_title',this).stop().animate({ backgroundColor: "#559EC7" }, {queue:false,duration:450});
	},function() {
		$('.item_image',this).stop().animate({ borderTopColor: "#D9D9D9",borderLeftColor: "#D9D9D9",borderRightColor: "#D9D9D9"}, {queue:false,duration:speedFadeIn});
		$('.item_title',this).stop().animate({ backgroundColor: "#333"}, {queue:false,duration:450});
	});
}

function over_item_brands(){
	$("ul#brands li").hover(function() {
		$(this).addClass("over_brand");
	},function() {
		$(this).removeClass("over_brand"); 
	});
}

function over_button(){
		$(".button").hover(function() {
		$(this).stop().animate({ backgroundColor: "#333"}, {queue:false,duration:speedFadeIn});
	},function() {
		$(this).stop().animate({ backgroundColor: "#559EC7"}, {queue:false,duration:speedFadeOut});
	});
}

// FILTER PRODUCTS //
function filter_products(){
	$('.module_search .button').click(function(){
		$('#content_form_search').slideToggle(400);
		return false;
	});
	$('#banners').easySlider({
		controlsShow:false,
		continuous:true,
		auto:true,
		vertical:false,
		speed:600,
		pause:10000
	});
}