jQuery.backstretch("http://fatboyslim.net/wordpress/wp-content/themes/thematic/images/background.jpg", {speed: 0});

$.preloadImages = function()
{
       for(var i = 0; i<arguments.length; i++)
       {
               $("<img />").attr("src", arguments[i]);
       }
};

$(document).ready(function()
{   $.preloadImages("http://fatboyslim.net/wordpress/wp-content/themes/thematic/images/teelarge.jpg","http://fatboyslim.net/wordpress/wp-content/themes/thematic/images/fatboy-logo.png","http://fatboyslim.net/wordpress/wp-content/themes/thematic/images/logo.png","http://fatboyslim.net/wordpress/wp-content/themes/thematic/images/tickets-header.png","http://fatboyslim.net/wordpress/wp-content/themes/thematic/images/bg-tool.png","http://fatboyslim.net/wordpress/wp-content/themes/thematic/images/background-sml.jpg");
});

$(function(){
      $('.pink .buy-now').hover(function(){
        $(this).parent().parent().parent().addClass('bgPink');
      }, function(){
        $(this).parent().parent().parent().removeClass('bgPink');
      });
      $('.blue .buy-now').hover(function(){
        $(this).parent().parent().parent().addClass('bgBlue');
      }, function(){
        $(this).parent().parent().parent().removeClass('bgBlue');
      });
    });
    
$(document).ready(function(){
		$(".more_details").colorbox({width:"610px", height:"500px", inline:true, transition:'elastic',speed:'100',href:"#more-info", title:""});
	});

this.imagePreview = function(){	
	/* CONFIG */
		
		xOffset = 180;
		yOffset = -490;
		
		// these 2 variable determine popup's distance from the cursor
		// you might want to adjust to get the right result
		
	/* END CONFIG */
	$("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();
    });				
};

// starting the script on page load
$(document).ready(function(){
	imagePreview();
});

// Facebook : Sharing Method
function shareFB(url, title)
{
	var u = encodeURIComponent(url);
	var t = encodeURIComponent(title);
	window.open("http://facebook.com/sharer.php?u=" + u + "&t=" + t, "facebookShare", "width=650, height=400, resizeable=0, toobar=0, status=0");
	return false;
   }

function noClick() {}
