$(document).ready(function() {




//Hide all best buy tables
for(i=1;i<5;i++){
	$(".bbtable"+i).hide();
}
//Show first table
$(".bbtable1").show();

$("#contentMain h3").hide();

	$("select").change(function () {
	  var str = "";
	  $("select option:selected").each(function () {
			str += $(this).attr("value");
			
			for(i=1;i<5;i++){
			
			//On select hide all best buy tables
			
			$(".bbtable"+i).hide();
			
				//On select choice, show correct table
				if(str == 1){
					$(".bbtable1").show();
				}
				if(str == 2){
					$(".bbtable2").show();
				}
				if(str == 3){
					$(".bbtable3").show();
				}
				if(str == 4){
					$(".bbtable4").show();
				}

			}
			
			
			
		  });

	})
  
        
  var options = {
    newsList: "#news",
    startDelay: 10
  }
  $().newsTicker(options);


  $("#news").removeClass("hidenews");


  //print link
  $("#print").click(function () {
  	printLink();
  	return false;
  });
  
    //bookmark link
  $("#bookmark").click(function () {
  	bookmark('{{env::website_title}}', '{{env::path}}{{env::request}}');
  	return false;
  });

});
