
function fbs_click(){u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)
+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;}
function input_empty_on_focus(){if(this.value==input_defaults[this.getAttribute("id")]){this.value="";}
return true;}
function input_reset_on_empty(){if($.trim(this.value)==""){this.value=input_defaults[this.getAttribute("id")];}
return true;}
function handle_cart_result(response){response=Number(response)
if(!isNaN(response)){cart_count=response;$("#shopping_login td.cart_number_of_frames div").text(response);}
$("#shopping_login table").toggleClass("too_many",cart_count>max_sample_count);return cart_count!==cart_count_old;}
function show_lang_dropdown_open(){$(this).addClass("ddTitleClicked");}
function hide_lang_dropdown_open(){$("#lang_dropdown_title").removeClass("ddTitleClicked");}
function add_to_cart(id,callback){var cart_count_old=cart_count;$.get("/cart/add_cart",{cart:id},function(body,status){var success=handle_cart_result(body);if(success&&cart_count_old==0){var first_msg=$('#first_msg').val();if(first_msg.length>0){alert(first_msg);}}
if(callback){callback(success);}})}
function remove_from_cart(id,callback){var cart_count_old=cart_count;$.get("/cart/remove_cart",{cart:id},function(body,status){var success=handle_cart_result(body);if(callback){callback(success);}})}
function ajax_wait(wait,prefix){var c="ajax_wait";if(prefix){c=prefix+c;}
$("."+c).toggleClass("ajax_wait_show",wait).toggleClass("ajax_wait_hide",!wait);}
