this.imagePreview = function(){			
		xOffset = 100;
		yOffset = -495;	
	$("a.preview").hover(function(e){
		this.t = this.title;
		this.title = "";	
		var c = (this.t != "") ? "<br/>" + this.t : "";
		$("body").append("<p id='preview'><img src='"+ this.href +"' alt='Image preview' />"+ c +"</p>");								 
		$("#preview")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("fast");						
    },
	function(){
		this.title = this.t;	
		$("#preview").remove();
    });	
	$("a.preview").mousemove(function(e){
		$("#preview")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});			
};

$(document).ready(function() {
	
	// SLIDESHOWS
	$('#slides').before('<div id="slider-nav">').cycle({ 
		fx:     'fade', 
		timeout: 6000,
		speed: 500,
		autostop: true,
		autostopCount: 5,
		pager:  '#slider-nav' 
	});
	$('#sidebar-testimonials').cycle({ 
		fx:     'fade', 
		timeout: 10000,
		speed: 800, 
		pause:  true,
		random: true 
	});

	$("a[rel^='facebox']").facebox();

	
	// INPUT HINT OVERLAY
	$("form#side-free-quote label").hide();
	$("form#side-free-quote").inputHintOverlay(5, 5);
	
	
	// EQUAL COL HEIGHT
	var max_height = 0;
	$("div.product").each(function(){
	if ($(this).height() > max_height) { max_height = $(this).height(); }
	});
	$("div.product").height(max_height);

	// CLICKABLE CONTAINER
	$('.home-bottom-callout').click(function() {
        var href = $(this).find("a").attr("href");
        if(href) {
            window.location = href;
        }
    });
	
	$('.list-2col').easyListSplitter({ colNumber: 2 });
	
	// STIPED TABLES
	$("table.striped tr:odd").addClass("alt-row");
	




	imagePreview();


  });
