/* js Document   index.js  */

window.onresize = function() {
	var test = $('#right').offset().left + 118;
	test = test +'px';
	$('div#ui-datepicker-div').stop().animate( {left: test}, "fast" );

}

$(document).ready(function() {
	$('a#img1').hide();
	$('a#img2').hide();
	$('a#img3').hide();	
	
	$(".gallery a[rel^='prettyPhoto']").prettyPhoto({theme:'facebook'});
	
});


$(function() {	   		   
		   
$('#inline').datepicker({ inline: true });  
$('#inline').focus();   
		   
/* alert("test"); */ 
var t = 1;

	$.timer(2000, function (timer) {
			switch ( t ) {
			  case 0:
			  case 1:
			  case 2:
			  case 3:
			  case 4: 
			  case 5:
			  c1(); break; 
			  case 6:
			  c0(); break; 
			  case 7:
			  case 8:
			  case 9:
			  case 10:
			  case 11:
			  case 12:
			  c2(); break;
			  case 13:
			  c0(); break; 
			  case 14:
			  case 15:
			  case 16:
			  case 17:
			  case 18:
			  c3();  break; 
			  case 19:
			  c0(); break;
			  case 20:
			  
			  default:
			   if (t > 20){t = 0;}
			} /* switch end */
			t = t + 1;	
	}); /* timer end */
});

$(function() {  
	
	$('#obj1a').hover(
		function(){
			$("#obj1").stop().animate({top:"-60px"}, "fast");
			$("#obj0").stop().animate({top:"506px"}, "fast")
		},
		function(){
			$("#obj1").stop().animate({top:"-70px"}, "fast");
			$("#obj0").stop().animate({top:"510px"}, "fast")
		}
	);
	
	$('#eng').hover(
		function(){
			$("#english").stop().animate({top:"5px"}, "fast")
		},
		function(){
			$("#english").stop().animate({top:"0px"}, "fast")
		}
	);
	
	$('#obj10a').hover(
		function(){
			$("#obj10").stop().animate({top:"18px"}, "fast")
		},
		function(){
			$("#obj10").stop().animate({top:"11px"}, "fast")
		}
	);
	
	$('a#obj11a').hover(
		function(){
			$("div#obj11").stop().animate({top:"18px"}, "fast")
		},
		function(){
			$("div#obj11").stop().animate({top:"11px"}, "fast")
		}
	);
	
	$('#obj12a').hover(
		function(){
			$("#obj12").stop().animate({top:"18px"}, "fast")
		},
		function(){
			$("#obj12").stop().animate({top:"11px"}, "fast")
		}
	);
	
	$('#obj13a').hover(
		function(){
			$("#obj13").stop().animate({top:"18px"}, "fast")
		},
		function(){
			$("#obj13").stop().animate({top:"11px"}, "fast")
		}
	);
	
	$('#obj14a').hover(
		function(){
			$("#obj14").stop().animate({top:"18px"}, "fast")
		},
		function(){
			$("#obj14").stop().animate({top:"11px"}, "fast")
		}
	);
	
	$('#obj15a').hover(
		function(){
			$("#obj15").stop().animate({top:"18px"}, "fast")
		},
		function(){
			$("#obj15").stop().animate({top:"11px"}, "fast")
		}
	);
	
	
	$('a#fmenu1a').hover(
		function(){
			$("div#fmenu10").stop().animate( { top: '-8px' },300 );
		},
		function(){
			$("div#fmenu10").stop().animate( { top: '0px'}, 300 );
		}
	);
	
	$('a#fmenu2a').hover(
		function(){
			$("div#fmenu20").stop().animate( { top: '-8px' }, 300 );
		},
		function(){
			$("div#fmenu20").stop().animate( { top: '0px' }, 300 );
		}
	);	
	
	$('a#fmenu3a').hover(
		function(){
			$("div#fmenu30").stop().animate( { top: '-8px' },300 );
		},
		function(){
			$("div#fmenu30").stop().animate( { top: '0px' }, 300 );
		}
	);	

	$('a#fmenu4a').hover(
		function(){
			$("div#fmenu40").stop().animate( { top: '-8px' }, 300 );
		},
		function(){
			$("div#fmenu40").stop().animate( { top: '0px' }, 300 );
		}
	);	

	$('a#fmenu5a').hover(
		function(){
			$("div#fmenu50").stop().animate( { top: '-8px' }, 300 );
		},
		function(){
			$("div#fmenu50").stop().animate( { top: '0px' }, 300 );
		}
	);	
	
	$('a#fmenu1ah').hover(
		function(){
			$("div#fmenu10").stop().animate( { top: '-8px' },300 );
		},
		function(){
			$("div#fmenu10").stop().animate( { top: '0px'}, 300 );
		}
	);
	
	$('a#fmenu2ah').hover(
		function(){
			$("div#fmenu20").stop().animate( { top: '-8px' }, 300 );
		},
		function(){
			$("div#fmenu20").stop().animate( { top: '0px' }, 300 );
		}
	);	
	
	$('a#fmenu3ah').hover(
		function(){
			$("div#fmenu30").stop().animate( { top: '-8px' },300 );
		},
		function(){
			$("div#fmenu30").stop().animate( { top: '0px' }, 300 );
		}
	);	

	$('a#fmenu4ah').hover(
		function(){
			$("div#fmenu40").stop().animate( { top: '-8px' }, 300 );
		},
		function(){
			$("div#fmenu40").stop().animate( { top: '0px' }, 300 );
		}
	);	

	$('a#fmenu5ah').hover(
		function(){
			$("div#fmenu50").stop().animate( { top: '-8px' }, 300 );
		},
		function(){
			$("div#fmenu50").stop().animate( { top: '0px' }, 300 );
		}
	);		
	
}); 



function c0 () {
	$('a#img1').fadeOut("slow");
	$('a#img2').fadeOut("slow");
	$('a#img3').fadeOut("slow");
}

function c1 () {
	$('a#img2').fadeOut("fast");
	$('a#img3').fadeOut("fast");
	$('a#img1').fadeIn("slow");
}

function c2 () {
	$('a#img1').fadeOut("fast");
	$('a#img3').fadeOut("fast");
	$('a#img2').fadeIn("slow");
}

function c3 () {
	$('a#img1').fadeOut("fast");
	$('a#img2').fadeOut("fast");
	$('a#img3').fadeIn("slow");
}

