// javascript functions used throughout the site
$(document).ready(function()
{
	$.ifixpng('/images/pixel.gif');
	
	$('.png').ifixpng();
	
	$('.bg_box').ifixpng();

	$('img[@src$=.png]').ifixpng(); // apply IE6 transparent PNG fix
});

// pre-submit callback 
function showRequest(formData, jqForm, options) 
{ 
	$('.status').html('');
	
    return true; 
} 

// post-submit callback 
function showResponse(responseJSON)  
{ 
	var response = eval(responseJSON); 
	
	if (response.status == 1)
	{
		for (var i = 0; i < response.message.length; i++)
		{
			$('#' + response.message[i].id).siblings('span').html( response.message[i].msg ); // print error message
		}
	}
	else
	{
		$('.processing').attr('class','status successful').html(response.message);
		post_submit(response);
	}
	
}

function clearField(id) {
	$('#'+id).val('');
}

function getPriceRange(val, lnk) {
	$.ajax({
		type:'POST',
		url: lnk,
		data:'prod_gp_id='+val,
		success:function(html){
			$('#price_range_wrap').html(html);
		}
	});
}

$(window).bind('load', function() {
	$('.bigImage').css('left', '0px');
});