/*
 * --------------------------------------------------------------------
 * Project SlideShow
 * Code by shadowjohn@PTT, Modified by Hanhsi Chen 
 * Version: 1.1, 17.05.2011 	
 * --------------------------------------------------------------------
 */
 
function justResize(){window_size=getWindowSize();$("#show_id").css({"height":(parseInt((window_size["height"])-200)*95/100)+"px"});};$(document).ready(function(){$("#preload").css("background-image","url(loading.gif)");$("#show_id").css("display","none");});$(window).load(function(){window["the_rand"]=0;$(window).resize(function(){justResize();});$("#preload").css("background-position","0 -30px");$("#show_id").attr("src",$("#library img")[window["the_rand"]].src);$("#link").attr("href",$("#link-library a")[window["the_rand"]].href);$("#show_id").fadeIn();justResize();setInterval(_1,5000);function _1(){if(window["the_rand"]>=$("#library img").length-1){window["the_rand"]=0;}else{window["the_rand"]++;}$("#show_id").fadeOut(600,function(){$("#show_id").attr("src",$("#library img")[window["the_rand"]].src);}).fadeIn(600);$("#link").attr("href",$("#link-library a")[window["the_rand"]].href);justResize();$("#t1, #t2, #t3,#t4,#t5,#t6, #t7, #t8,#t9,#t10").css("background-color","rgb(170,170,170)");$("#t"+(window["the_rand"]+1)).css("background-color","rgb(70,70,70)");};});
