// Sitewide jQuery calls

jQuery.noConflict();
jQuery(document).ready(function($){
	
//set first instance margins to zero
$("#two_column_1 p:first, #two_column_1 h1:first, #two_column_1 h2:first, #two_column_2 h3:first, #three_column_3 h3:first").css("margin-top", "0px");

//main navigation drop down menus
$("#nav ul.sf-menu").superfish({ 
	animation: {height:'show'},   // slide-down effect without fade-in 
	delay:     500               // 1.2 second delay on mouseout 
}); 
		
//set form default field values
 var default_values = {};
  jQuery('.hidelabel input').each(function(i) {
	var index = jQuery(this).attr('name');
	var value = jQuery(this).val();
	default_values[index] = value;
  });

  jQuery('.hidelabel input').focus(function() {
	if(jQuery(this).val() === default_values[jQuery(this).attr('name')]) {
	  jQuery(this).val('');
	};
  })
  
  jQuery('.hidelabel input').blur(function() {
	if(jQuery(this).val() === "") {
	  jQuery(this).val(default_values[jQuery(this).attr('name')]);
	}; 
  })

// png transparency fix
$('body').supersleight({shim: '/themes/nestor-imports/images/x.gif'});
$(function() {
	if (jQuery.browser.msie && $.browser.version>="7.0")
	$('img[src$=.png], img[src$=.gif]').each(function() {
	this.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+this.src+",sizingMethod='scale')";
	});
});

});