$(document).ready(function(){
	   // Initiate Autocomplete
	$("#driversearch").autocomplete(models);
	
	// Consumer Page Testimonial Block
	$("#columnright div.light .content").hide();
	$("#columnright .roundbox h2 a").click(function(){
		if ($(this).parents("div.roundbox").hasClass("light")){
		    
		    /*[mst-20090224:start] expand the what people are saying box when click the header text */
		    $(this).parents("div.roundbox").siblings("div.roundbox").children("div.content").hide();
		    $(this).parents("div.roundbox").children("div.content").show();
		    /*[mst-20090224:end] expand the what people are saying box when click the header text */
		    
			$(this).parents("div.roundbox").removeClass("light");
			$(this).parents("div.roundbox").siblings("div.roundbox").addClass("light");
			$("#columnright .roundbox").next(".roundbox").children("p").hide();
		}
	    $("#columnright .roundbox").next(".light").children("p").show();
		$("#columnright .roundbox").next(".roundbox").children(".content").css("height",146);
		return false;
	});
});


//[pg-20090302:start] Load the Consumer Default Page - Flash Banners
$(document).ready(function(){
    LoadFlashFile($("#hidfilepath").val());
});

function LoadFlashFile(filepath){
    if( filepath != '' ){
        var so = new SWFObject("../Flash/consumer.swf", "sotester", "460", "225", "9", "#FFFFFF");
        so.addParam ("wmode", "transparent");
        so.addParam ("allowScriptAccess", "always");
        so.addVariable ("fv_feed", filepath);
        so.write("featured_products");
     }
}
//[pg-20090302:end] Load the Consumer Default Page - Flash Banners