// JavaScript Document
// DOM Ready
$(function(){
/**************************************************
	         Sliders
**************************************************/
	$('#wrapper').css({display:'block'});
	$('#slider1').anythingSlider();
	$('#slider3').anythingSlider({
		resizeContents      : false,     // If true, solitary images/objects in the panel will expand to fit the viewport
		autoPlay            : false,     // This turns off the entire slideshow FUNCTIONALY, not just if it starts running or not
		//navigationFormatter : formatText // Format navigation labels with text
	});
/**************************************************
	Corners
**************************************************/
	$(".footer_blocks").corner("3px");
	$("#menu a").corner("3px");
	$("#sub_menu a").corner("3px");
	$(".slide_text a").corner("3px");
	$(".boxgrid .more").corner("3px");
	$(".boxgrid_prod .more").corner("3px");
/**************************************************
	Sliding captions over images
**************************************************/
	//Preload image, center image, fade in image
	$('.boxgrid img').load(function() {
		$(this).css({
			top: ($('.boxgrid').height() - $(this).height()) / 2,
			left: ($('.boxgrid').width() - $(this).width()) / 2
		});
	});

//Full Caption Sliding (Hidden to Visible)
	$('.boxgrid.captionfull').hover(function(){
		$(".cover", this).stop().animate({top:'0px'},{queue:false,duration:200});
	}, function() {
		$(".cover", this).stop().animate({top:'162px'},{queue:false,duration:200});
	});

//Full Caption Sliding (Hidden to Visible) for products page
	$('.boxgrid_prod.captionfull_prod').hover(function(){
		$(".cover_prod", this).stop().animate({top:'0px'},{queue:false,duration:200});
	}, function() {
		$(".cover_prod", this).stop().animate({top:'115px'},{queue:false,duration:200});
	});

	$('.default-value').each(function() {
		   var default_value = this.value;
		   $(this).focus(function(){
				   if(this.value == default_value) {
						   this.value = '';
				   }
		   });
		   $(this).blur(function(){
				   if(this.value == '') {
						   this.value = default_value;
				   }
		   });
	});
	
	$('#ticker').list_ticker({
		speed:5000,
		effect:'fade'
	});

	$("#mail_newsletter").validate();
	
	$(".clickable").click(function() {
		window.location = $(this).attr("url");
		return false;
	});

	$(".clickable").css( "cursor", "pointer" );

//    $("#logo img").load(function() {
//        alert($(this).height());
//        alert($(this).width());
//    });
});
	

