$(document).ready(function(){

	$("td.showsubmenu").hover(
	  function(){
		$("div.submenu").slideDown();  
		},
	  function(){
		$("div.submenu").slideUp();  
		}
	);
	$("div.submenu").click(function(){
		$(this).slideUp();  
	});
	$(".zoomer").hover(function() {
		$(this).parent("div.zoomer_container").css("background-position", "top");
		$(this).animate({zoom: "110%"}, "fast");
		//$(this).find("img.zoome").animate({zoom: "120%"}, "fast");
	}, function() {
		$(this).parent("div.zoomer_container").css("background-position", "bottom");
		$(this).animate({zoom: "1"}, "fast");
		//$(this).find("img.zoome").animate({zoom: "1"}, "fast");
	});
    $("#yazran").change(function(){
		$("#degem_name").load("/inc/degem_name.asp?yazran=" + encodeURI($(this).val()));
		if($(this).val()!=''){
			$("#degem_name").removeAttr("disabled");
		}else{
			$("#degem_name").attr("disabled", "disabled");
		}
	});    
	$("div.player_mask").mouseover(function(){
		$(this).fadeOut('slow', function(){$(this).remove()});
	});

	$("#resetForm").click(function(){
		$("div.hidden_contact").slideUp();
		$("#pratim_pniya").animate({height: '130px'});
		$("td.contact_item").animate({lineHeight: '32px'});
	});


	try{
	$("#webticker").webTicker({travelocity: 0.05, direction: -1});
	$("#stop").click(function(){
		$("#webticker").webTicker('stop');
	});
	
	$("#continue").click(function(){
		$("#webticker").webTicker('cont');
	});
	}catch(er){}
	
	
	$('#fontsizer').jfontsizer({
		applyTo: '.content_page, .branch_list td, .branch_list td a, .search_result td, .search_result td a',
		changesmall: '1',
		changelarge: '1',
		expire: 30
	});

});

function resetForm(FORM){
	for(i=0;i<FORM.length-2;i++){
		FORM[i].selectedIndex = 0;
	}
}

function checkForm(FORM){
	if(FORM["name"].value.length < 1){alert('יש למלא שם');FORM["name"].focus();return false;}
	if(FORM["telephone"].value.length < 1){alert('יש למלא טלפון');FORM["telephone"].focus();return false;}
	if(FORM["email"].value.length < 1){alert('יש למלא כתובת דואר אלקטרוני');FORM["email"].focus();return false;}
	if(FORM["snif"].value.length < 1){alert('יש לבחור סניף');FORM["snif"].focus();return false;}
	return true;
}


function checkLeadForm(FORM){
	if(FORM["full_name"].value.length < 1){alert('יש למלא שם');FORM["full_name"].focus();return false;}
	if(FORM["phone"].value.length < 1){alert('יש למלא טלפון');FORM["phone"].focus();return false;}
	if(FORM["email"].value.length < 1){alert('יש למלא כתובת דואר אלקטרוני');FORM["email"].focus();return false;}
	return true;
}

