jQuery(document).ready(function(){
	
	// Shadowbox
	Shadowbox.init({players: ['img', 'html', 'iframe', 'qt', 'wmp', 'swf', 'flv']});
	
	//jFav
	$('#bookmark').jFav();
	
	// Home page fade 
	$('#home_fade').cycle({
		fx: 'fade',
		timeout: 2000
	});
	
	// Home items fade 
	$('.home_item_slider').cycle({
		fx: 'fade',
		timeout: 2000
	});
	
	// Mouse over
	$('div.overview-image-con').mouseenter(function () {
				
		// Add the selected class
		$('.title a', $(this).parent()).addClass('selected');
		
	}).mouseleave(function () {
		
		// Remove selected class
		$('.title a', $(this).parent()).removeClass('selected');
	});
	
	// Menu top mouseenter and leave
	$("ul#menu_top li").mouseenter(function(){
     					
		$("a.level_1", this).css("color", "#ed1c24");
		$("ul.submenu", this).css("display", "block");
		
	}).mouseleave(function(){
		
		$("a.level_1", this).css("color", "#fff");
		$("ul.submenu", this).css("display", "none");
	
	});
	
	
	// Category overview mouseenter/leave
	$(".overview_item").mouseenter(function(){
		
		$(".overview_item_name", this).css({
			backgroundColor:"#ca0017",
			color:"#fff"
		});
		
		$(".overview_item_name a", this).css({
			color:"#fff"		
		});
		
	}).mouseleave(function(){
		
		$(".overview_item_name", this).css({
			backgroundColor:"#fff",
			color:"#808080"		
		});
		
		$(".overview_item_name a", this).css({
			color:"#808080"		
		});
		
	});
	
	if ($('#prev_y').is(':checked')){ $('.date_prev_service').css('display' , 'block'); }
	if ($('#prev_n').is(':checked')){ $('.date_prev_service').css('display' , 'none'); }
	
	// Service form
	$('#prev_y').click(function () {
		if ($(this).is(':checked')){
			$('.date_prev_service').css('display' , 'block');
		}
	});
	
	$('#prev_n').click(function () {
		if ($(this).is(':checked')){
			$('.date_prev_service').css('display' , 'none');
		}
	});
	
});
