$(document).ready( function(){

// Slider
	$("#slideshow2 , #slideshow").cycle('fade');
	
	$('#slider').cycle({ 
    fx: 'scrollLeft' 
	});
	$('#slider img').css({ display : 'block' });
// shadowbox initialization
							
	Shadowbox.init();

// For Menu Navigation.

	$('#nav a').prepend('<img src="images/bullets.png" alt="" /> ');
	$('#header a').prepend('<img src="images/bullets.png" alt="" />');
	
	$('.on').fadeTo('fast' , '0.3');
	

	var previousItem;
	var presentItem;
	var dataHeight;
	

	$("#nav a").hover(
		function() {
	
			presentItem = $(this).parent().find("ul.subnav");
			setTimeout(function() { $(presentItem).show(); }, 350);
			previousItem = presentItem;
			
		},
	
		function() {
			
			if (previousItem != null)
				{ $(previousItem).fadeOut(); }
	
		});

	
	$(".subnav").hover( 
	
		function(){

			$(this).css({'opacity' : '1' ,  'filter' : 'alpha(opacity=100)' })
			$(this).stop();
	
		},
	
		function() {
			$(this).fadeOut(150);
	
		});


	
			$('#news').load("data/news.txt");



			$("input:text, textarea, input:password").each(function(){
					if(this.value == '')
							this.value = this.name;
			});
			$("input:text, textarea, input:password").focus(function(){
					if(this.value == this.name)
							this.value = '';
			});
			$("input:text, textarea, input:password").blur(function(){
					if(this.value == '')
							this.value = this.name;
			});
			$("input:image, input:button, input:submit").click(function(){
					$(this.form.elements).each(function(){
							if(this.type =='text' || this.type =='textarea' || this.type =='password' ){
									if(this.value == this.name && this.name != ''){
											this.value='';
									}
							}
					});
			});



});