/***************************************************************************************************/
/***** site scripts ***************************************************************/
/***************************************************************************************************/             

$(document).ready(function() {
	
	$(".featured_client").colorbox({iframe:true, innerWidth:650, innerHeight:440}); 
	$(".deals_faq").colorbox(); 
	$(".popup_page").colorbox(); 

	$(function() {
		 $("div.menu img")
			  .mouseover(function() { 
					var src = $(this).attr("src").match(/[^\.]+/) + "-over.jpg";
					$(this).attr("src", src);
			  })
			  .mouseout(function() {
					var src = $(this).attr("src").replace("-over", "");
					$(this).attr("src", src);
			  });
	});

	
})


$(document).ready(function(){ 
	$(document).pngFix(); 
}); 


function MARKET_files(){

	jQuery('#type_3').attr("disabled", true);

}

function FOOD_files(){

	jQuery('#type_3').attr("disabled", false);

}


jQuery.fn.filterOn = function(radio, values) {
    return this.each(function() {
        var select = this;
        var options = [];
        $(select).find('option').each(function() {
            options.push({value: $(this).val(), text: $(this).text()});
        });
        $(select).data('options', options);
        $(radio).click(function() {
            var options = $(select).empty().data('options');
            var haystack = values[$(this).attr('id')];
            $.each(options, function(i) {
                var option = options[i];
                if($.inArray(option.value, haystack) !== -1) {
                    $(select).append(
                    $('<option>').text(option.text).val(option.value)
                    );
                }
            });
        });            
    });
};




