﻿function menuOver(obj){
	obj.className="layout-menu-item-over";
}
function menuOut(obj){obj.className="layout-menu-item";}
function goTo(path){location.href=path;}
/*
$(document).ready(function(){
	$("#nav-one li").hover(
		function(){ $("ul", this).show(); }, 
		function() { } 
	);
 	if (document.all) {
		$("#nav-one li").hoverClass ("sfHover");
	}
 });
 
$.fn.hoverClass = function(c) {
	return this.each(function(){
		$(this).hover( 
			function() { $(this).addClass(c);  },
			function() { $(this).removeClass(c); }
		);
	});
};	
*/
$(document).ready(
	function(){
		if($("#tab-company").attr("src").indexOf("-active")==-1){
			$("#tab-company").mouseover(
				function(){
					$("#tab-company").attr("src","/images/layout-tab-company-over.jpg");
				}
			);
			$("#tab-company").mouseout(
				function(){
					$("#tab-company").attr("src","/images/layout-tab-company.jpg");
				}
			);
		}
		if($("#tab-products").attr("src").indexOf("-active")==-1){
			$("#tab-products").mouseover(
				function(){
					$("#tab-products").attr("src","/images/layout-tab-products-over.jpg");
				}
			);
			$("#tab-products").mouseout(
				function(){
					$("#tab-products").attr("src","/images/layout-tab-products.jpg");
				}
			);
		}
		if($("#tab-support").attr("src").indexOf("-active")==-1){
			$("#tab-support").mouseover(
				function(){
					$("#tab-support").attr("src","/images/layout-tab-support-over.jpg");
				}
			);
			$("#tab-support").mouseout(
				function(){
					$("#tab-support").attr("src","/images/layout-tab-support.jpg");
				}
			);
		}
	}
);

// Removes boxes around links when clicked in FF
$(document).ready(function(){$("a").bind("focus",function(){if(this.blur)this.blur();});});

function callTarget(id,urlE,params){
	$("#"+id).slideUp(100, 'easeInSine');
	$.ajax({
		url: urlE,
		cache: false,
		data: params,
		async: true,
		success: function(html){
			//$("#"+id).hide();
			$("#"+id).html(html);
			$("#"+id).slideDown(700, 'easeOutSine');
			//$("#"+id).animate({  "opacity": "show" }, "slow", "easein");
		}
	});
}

function cartAction(id,urlE,params){
	//$("#shoppingCart").slideUp(100, 'easeInSine');
	$.ajax({
		url: urlE,
		cache: false,
		data: params,
		async: true,
		success: function(html){
			$("#shoppingCartContainer").html(html);
			//$("#shoppingCart").slideDown(700, 'easeOutSine');
		}
	});
}

