$(document).ready(function(){ 

        $("a.one").click( function(){ $
		("body").removeClass('bg2 , bg3').addClass("bg1");
	});

	$("a.two").click( function(){ $
		("body").removeClass("bg1 , bg3").addClass("bg2");
	});

	$("a.three").click( function(){ $
		("body").removeClass("bg1 , bg2").addClass("bg3");
	}); 
	
	$("#commentForm").validate();
	
	$(function() {
    $(".topImage").jCarouselLite({
    auto: 4000,
    speed: 2000,
	easing: "easeinout"
});
	
	

});



});

$(function() { $(".lavaLamp").lavaLamp({ fx: "backout", speed: 700 })});


function mySbOpen(){
        var c = Shadowbox.getCurrent();
        var pageLink = c.link.ownerDocument.URL;
        if(pageLink.indexOf('?')>1){
                pageLink = pageLink.split('?')[0]
        }
        var link2image = pageLink+"?the_item="+c.link.shadowboxCacheKey;
        var newDiv = $('<div id="sb-mylink">'+
                                   '<a id="printMe" href="#" title="Print me"><img src="../images/print.png" border="0"></a></div>');
        if($('div#sb-mylink')!=null){
                $('div#sb-mylink').remove();
        }
        newDiv.insertAfter($('div#sb-counter'));
        $('a#printMe').click(function(){
                    var theWork =  window.open('','PrintWindow');
                var html = "<html><head><title>Print An Image</title>";
                        html = html + "<link rel='stylesheet' href='../css/shadowbox.css' type='text/css' /><style>#sb-info{display:none;}div#sb-wrapper{left:20px !important;top:40px !important}</style></head>";
                        html = html + "<body><div id='myprint'>"+$('#sb-container').clone().html()+"</div></body></html>";
                        
                        theWork.document.open();
                        theWork.document.write(html);
                        theWork.document.close();
                        theWork.print();
                        theWork.close()
      return false;
                                                                  
        });
}

