
// 'AJAX' SPINNER

window.onload = spin; 
    function spin() {
        $("#loading").addClass("loaded");
    }




// GALLERY POPUPS

//  NOTE: This is sending the i_small images to the iPhone.


$(function(){
    userHeight=$(window).height();

    if (userHeight < 800) {
        newHeight=650;
        newWidth=630;
        imgPath = "i_small/"; // 1024x768 res directory
    } else {
        newHeight=800;
        newWidth=780;
        imgPath = "i/";
    }

    $('a.art').click(function(){
        window.open(this.href,'name','width=' + newWidth + ',height=' + newHeight + ',directories=no,resizable=no,status=no,location=no,scrollbars=no,menubar=no,toolbar=no,screenX=0,screenY=0,top=0,left=0');
        return false;
    });

	$(function(){
        imgName = $('.jar img').attr('alt');
            $('.jar div')
				.css( {backgroundImage: "url(../" + imgPath + imgName + ".jpg)"} );
		});

});
