$(document).ready(function() {
		
	//$(document).pngFix();	
		
	$('#container').fadeIn('slow', function() {
        $('#bg').delay(400).fadeIn("slow", function() {
        	$('#pane1').jScrollPane();
      	});
      });


	/* Subnav links */
			
	$('.sub_nav_link').hover(
	function(){
	    $(this).stop().animate({ color: "#ffffff" }, 'normal');
	},
	function(){
	    $(this).stop().animate({ color: "#8d8d8d" }, 'slow');
	}); 
			
	$('.nav_link').hover(
	function(){
	    $(this).stop().animate({ backgroundColor: "#9f1161" }, 'normal');
	},
	function(){
	    $(this).stop().animate({ backgroundColor: "#000000" }, 'fast');
	}); 
	
	$('.nav_link').click(function(){
		$(this).parent().parent().fadeOut('fast'); 
	}); 
		
	$('.main_nav_link').hover(
	function(){
	    $(this).stop().animate({ color: "#Cf4494" }, 'fast');
	},
	function(){
	    $(this).stop().animate({ color: "#ffffff" }, 'fast');
	}); 
			
	$('.footer_link').hover(
	function(){
	    $(this).stop().animate({ color: "#9f1161" }, 'fast');
	},
	function(){
	    $(this).stop().animate({ color: "#ffffff" }, 'fast');
	}); 
	
			
	$('#logo_image').hover(
	function(){
	    $(this).stop().fadeTo("normal",.7);
	},
	function(){
	    $(this).stop().fadeTo("slow",1);
	}); 
	
	
	$('.collection_hover').hover(
	function(){
	    $(this).stop().fadeTo("normal",.6);
	},
	function(){
	    $(this).stop().fadeTo("slow",1);
	}); 
	
	$('#nav_links li').hover(  
	         function () {  
	             //show its submenu  
	             $('ul', this).fadeIn('fast');  
	   
	         },   
	         function () {  
	             //hide its submenu  
	             $('ul', this).fadeOut('fast');           
	         }  
	     );
	
	/*$('#home img:gt(0)').hide();	
	setInterval(function(){$('#home :first-child').fadeOut(2000).next('img').fadeIn(2000).end().appendTo('#home');}, 5000);*/
	
	$("a[rel^='prettyPhoto']").prettyPhoto({flash_markup: '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" data="{path}" type="application/x-shockwave-flash" width="{width}" height="{height}"><param name="wmode" value="{wmode}" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="{path}" /><param name="FlashVars" value="{flashVars}" /><embed src="{path}" width="{width}" height="{height}" FlashVars="{flashVars}"></embed></object>', theme:'facebook'});
	
	$("#country").change( function() {
		 $.ajax({
		   type: "POST",
		   url: DOCUMENT_ROOT + "/ajax/getStates.php",
		   data: "country=" + $(this).val(),
		   success: function(response){			  
			   var result = JSON.parse(response);
			   if(result['status']=='success')
			   {				   
				   $('#states').html(result['html']);
				   $('#submit').show();
			   }
		   }
		 });
		
		
	});

});

