jQuery.fn.fadeToggle = function(speed, easing, callback) {return this.animate({opacity: 'toggle'}, speed, easing, callback);};



jQuery(document).ready(function(){

		var new_post = jQuery('#new_post').val();  
		if(new_post==1){
		jQuery('#country').append('<option value="USA" selected="selected"> USA </option>');
		}
		jQuery('#country').change(function() {

												 

		var y = jQuery('#temp_url').val();  

		var country = jQuery('#country').val();  

		var img = y + "/images/loading.gif" ;

		

		jQuery("#state").fadeOut('slow');

		jQuery("#state").fadeIn('slow');

		//jQuery("#state").empty().html('<img alt="loading" src="+ img +" />');

		var x = y + "/get_states.php";

		jQuery.post(x, { country: country },

		function(data){

	    jQuery('#state').html(data);    	

   });

		

});							

	
	 jQuery("#certification:checkbox").click(function(){
			jQuery("input:checked").length;
			jQuery('#has_certification').fadeToggle("slow");
			}
		);	
	

	jQuery('a#ad-toggle').click(function() {jQuery('#formbox').fadeToggle("slow"); return false;});	

	jQuery('a#email-toggle').click(function() {jQuery('#email_form_data').fadeToggle("slow"); return false;});

	jQuery("img.size-thumbnail").parent().fancybox({"hideOnContentClick":true,"overlayShow":true,"overlayOpacity":.5,"zoomSpeedIn":300,"zoomSpeedOut":300});
	
	
	
   
    });




/*jQuery(function(){
    
    	// MENUS    	
		jQuery('#flat').menu({ 
			content: jQuery('#flat').next().html(), // grab content from this page
			showSpeed: 400
		});
			

  
});

*/

