

    if (document.images)
    {
      preload_image_object = new Image();
      // set image url
      image_url = new Array();
      image_url[0] = "images/hover1.gif";
      image_url[1] = "images/hover2.gif";
      image_url[2] = "images/hover3.gif";
      image_url[3] = "images/hover4.gif";
	  image_url[4] = "images/hover5.gif";
      image_url[5] = "images/hover6.gif";
      image_url[6] = "images/hover7.gif";
      image_url[7] = "images/hover8.gif";
      image_url[8] = "images/hover9.gif";
      image_url[9] = "images/hover10.gif";
      image_url[10] = "images/hover11.gif";
      image_url[11] = "images/hover12.gif";
      image_url[12] = "images/hover13.gif";
      image_url[13] = "images/hover14.gif";
      image_url[14] = "images/hover15.gif";
	  image_url[15] = "images/hover16.gif";
      image_url[16] = "images/hover17.gif";
      image_url[17] = "images/hover18.gif";
      image_url[18] = "images/hover19.gif";
      image_url[19] = "images/hover20.gif";
      image_url[20] = "images/hover21.gif";
      image_url[21] = "images/hover22.gif";
      image_url[22] = "images/hover23.gif";
      image_url[23] = "images/hover24.gif";
      image_url[24] = "images/hover25.gif";
      image_url[25] = "images/hover26.gif";
	  image_url[26] = "images/hover27.gif";
      image_url[27] = "images/hover28.gif";
      image_url[28] = "images/hover29.gif";
      image_url[29] = "images/hover30.gif";
      image_url[30] = "images/hover31.gif";
      image_url[31] = "images/hover32.gif";
      image_url[32] = "images/hover33.gif";
      image_url[33] = "images/hover34.gif";
      image_url[34] = "images/hover35.gif";
      image_url[35] = "images/hover36.gif";
	  image_url[36] = "images/hover37.gif";
      image_url[37] = "images/hover38.gif";
      image_url[38] = "images/hover39.gif";
      image_url[39] = "images/hover40.gif";
      image_url[40] = "images/hover41.gif";
      image_url[41] = "images/hover42.gif";
	  image_url[42] = "images/hover43.gif";
      image_url[43] = "images/hover44.gif";
      image_url[44] = "images/hover45.gif";
      image_url[45] = "images/hover46.gif";
	  image_url[46] = "images/hover47.gif";
      image_url[47] = "images/hover48.gif";
      image_url[48] = "images/hover49.gif";
      image_url[49] = "images/hover50.gif";
      image_url[50] = "images/hover51.gif";
      image_url[51] = "images/hover52.gif";
	  image_url[52] = "images/hover53.gif";
      image_url[53] = "images/hover54.gif";
      image_url[54] = "images/hover55.gif";
      image_url[55] = "images/hover56.gif";
	  image_url[56] = "images/hover57.gif";
      image_url[57] = "images/hover58.gif";
      image_url[58] = "images/hover59.gif";
      image_url[59] = "images/hover60.gif";
      image_url[60] = "images/hover61.gif";
      image_url[61] = "images/hover62.gif";
	

	
       var i = 0;
       for(i=0; i<=31; i++) 
         preload_image_object.src = image_url[i];
    }

   
	$(document).ready(function(){
    
    $(".transition").click(function () {
	  $("#white").show()
      $("#white").slideUp("medium");
	  
    });

  });










	jQuery(function($) {
		
		$('.gallery_demo_unstyled').addClass('gallery_demo'); // adds new class name to maintain degradability
		
		$('ul.gallery_demo').galleria({
			history   : true, // activates the history object for bookmarking, back-button etc.
			clickNext : true, // helper for making the image clickable
			insert    : '#main_image', // the containing selector for our main image
			onImage   : function(image,caption,thumb) { // let's add some image effects for demonstration purposes
				
				// fade in the image & caption
				if(! ($.browser.mozilla && navigator.appVersion.indexOf("Win")!=-1) ) { // FF/Win fades large images terribly slow
					image.css('display','none').fadeIn(600);
				}
				caption.css('display','none').fadeIn(1000);
				
				// fetch the thumbnail container
				var _li = thumb.parents('li');
				
				// fade out inactive thumbnail
				_li.siblings().children('img.selected').fadeTo(500,1);
				
				// fade in active thumbnail
				thumb.fadeTo('fast',1).addClass('selected');
				
				// add a title for the clickable image
				image.attr('title','Next image >>');
			},
			onThumb : function(thumb) { // thumbnail effects goes here
				
				// fetch the thumbnail container
				var _li = thumb.parents('li');
				
				// if thumbnail is active, fade all the way.
				var _fadeTo = _li.is('.active') ? '1' : '1';
				
				// fade in the thumbnail when finnished loading
				thumb.css({display:'none',opacity:_fadeTo}).fadeIn(1500);
				
				// hover effects
				thumb.hover(
					function() { thumb.fadeTo('fast',1); },
					function() { _li.not('.active').children('img').fadeTo('fast',1); } // don't fade out if the parent is active
				)
			}
		});
	});
	
	
function domRollover() {
	if (navigator.userAgent.match(/Opera (\S+)/)) {
		var operaVersion = parseInt(navigator.userAgent.match(/Opera (\S+)/)[1]);
	}
	if (!document.getElementById||operaVersion <7) return;
	var imgarr=document.getElementsByTagName('img');
	var imgPreload=new Array();
	var imgSrc=new Array();
	var imgClass=new Array();
	for (i=0;i<imgarr.length;i++){
		if (imgarr[i].className.indexOf('domroll')!=-1){
			imgSrc[i]=imgarr[i].getAttribute('src');
			imgClass[i]=imgarr[i].className;
			imgPreload[i]=new Image();
			if (imgClass[i].match(/domroll (\S+)/)) {
				imgPreload[i].src = imgClass[i].match(/domroll (\S+)/)[1]
			}
			imgarr[i].setAttribute('xsrc', imgSrc[i]);
			imgarr[i].onmouseover=function(){
				this.setAttribute('src',this.className.match(/domroll (\S+)/)[1])
			}
			imgarr[i].onmouseout=function(){
				this.setAttribute('src',this.getAttribute('xsrc'))
			}
		}
	}
}
domRollover();
