this.screenshotPreview = function(){	
	/* CONFIG */
		
		xOffset = 10;
		yOffset = 30;
		iWidth = 217;
		
	/* 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).attr('preview') +"' width='"+ iWidth +"' />"+ c +"</p>");
		$("#preview")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.width(iWidth)
			.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");
	});			
};



// starting the script on page load
$(document).ready(function(){

	$("#mainNav li a").not("li.current a").hover(
	function(){$(this).parent().css({"background-image": "url(/images/nav_arrow_big.png)" , "padding-bottom":"7px"});},
	function(){$(this).parent().css({"background-image": "url(/images/nav_arrow_small.gif)" , "padding-bottom":"3px"});}
	);
	
	$("#phone, #email").each(function(){if($(this).attr("value") == "") $(this).attr("value", $(this).attr("rel"));});
	$("#phone, #email").focus(function(){ 
		if($(this).attr("value") == $(this).attr("rel")) $(this).attr("value", "");  
	});  
	$("#phone, #email").blur(function(){  
		if($(this).attr("value") == "") $(this).attr("value", $(this).attr("rel"));  
	});  

	$(".board, .board-right, .epigraph").css("opacity","0.8");
	$("a.preview").fancybox({ 'scrolling' : 'no',
							  'titleShow':false,
							  'autoDimensions':false,
							  'width' : 700,
							  'height' : 580,
							  'padding': 0,
							  'onComplete': function(){$('#scroll-content').jScrollPane({'scrollbarWidth':14,'scrollbarWidth':14,'scrollbarMargin':8}); $('#fancybox-href').attr('back',$(this).attr('href')); }});
	$("a.viewSite").fancybox({ 'padding': 0 });
	
	//screenshotPreview();
	
	$('.portfolio-categories li:first').css('margin-left','-168px');
	$('.portfolio-list li:first').css('margin-left','-168px');
	
});