/*
 * Preview script 
 * powered by jQuery (http://www.jquery.com)
 * 
 * written by _
 * 
 * _
 *
 */
 
this.divOpener = function(){	

$("div.opener-text").hide();
$("div.opener").addClass("opener-img");

	/* CONFIG */
		
		xOffset = 220;
		yOffset = -440;
		
		// these 2 variable determine popup's distance from the cursor
		// you might want to adjust to get the right result
		
	/* END CONFIG */
/*	$("div.opener").hover(function(e){
		//this.title = "";
		//var c = (this.t != "") ? "<br/>" + this.t : "";
		opendiv = this.id + "text";
		$("div #"+opendiv).show("fast");
	
    },
	function(){
		$("div #"+opendiv).hide("fast");
    });
*/
/*	$("div.opener").click(function(e){
		//opener  = this.id;
		//opendiv = this.id + "text";
		//$("div #"+opener).removeClass("opener-img");
		//$("div #"+opendiv).slideDown("fast");
		$(this).next("div").slideUp('fast');
		$(this).addClass("opener-img");
    });
*/
	$("div.opener-img").click(function(e){
		//opener  = this.id;
		//opendiv = this.id + "text";
		//$("div #"+opener).removeClass("opener-img");
		//$("div #"+opendiv).slideDown("fast");
		$(this).next("div").slideDown('fast');
		$(this).removeClass("opener-img");
    });


	$("div #openeddiv").click(function(e){

		//$("div #openeddiv).hide("fast");
    });
	
};


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