
$(document).ready(function(){ 
	
/*	jQuery('#thumbnails ul').jcarousel({
        vertical: true,
        scroll: 2,
		start: 1,
		
    });	*/
	var preLoad = new Array();;
	$("#xxx").click( function(i) {

		$(".gallery_link").removeClass('selected');
		$(this).addClass('selected'); 
		$("#decor_photo").attr('src', $(this).attr('href'));
		alert($(this).attr('href'));
		preLoad[i] = new Image();
		preLoad[i].src = $(this).href;
		return false; 
	});	 
	$("#decor_photo").cycle(
		{
			fx:      'scrollRight',	
			timeout:  5000,	
			speed:  1000, 
			pager:  '#decor_thumbs',
			pagerAnchorBuilder: function(idx, slide) {
			// return selector string for existing anchor
			return '#decor_thumbs li:eq(' + idx + ') a';
		}
});
	/*


$('#slideshow').before('<ul id="nav">').cycle({ 
    fx:     'turnDown', 
    speed:  'fast', 
    timeout: 0, 
    pager:  '#nav', 
     
    // callback fn that creates a thumbnail to use as pager anchor 
    pagerAnchorBuilder: function(idx, slide) { 
        return '<li><a href="#"><img src="' + slide.src + '" width="50" height="50" /></a></li>'; 
    } 
});

			
    $("#jCarouselLite").jCarouselLite({
        btnNext: ".down",
        btnPrev: ".up",
		vertical: true,
		visible: 4
		
    });	
	*/
	
//	var ximage = new Array();
//	for (i=0;i<links.length;i++) {
//		//links[i].title = "Mouse-Over to View";
//		links[i].onmouseover = function(){
//			$('decor_photo').src = this.href;
//			return false;
//		}
//		links[i].onclick = function(){
//			return false;
//		}
//		ximage[i] = new Image();
//		ximage[i].src = links[i].href;
//        
//    }
});


jQuery.preloadImages = function()
{
  for(var i = 0; i<arguments.length; i++)
  {
    jQuery("<img>").attr("src", arguments[i]);
  }
}