(function($){

/* tab ajax */	  
$(document).ready(function(){
	$(".tab_menu_ttl > li").click(function(e){
		switch(e.target.id){
			/////////////////////////// корзина
			case "tab_cart":
				//change status & style menu
				$("#tab_cart").addClass("active");
				$("#tab_currencies").removeClass("active");
				$("#tab_respond").removeClass("active");
				//display selected division, hide others	
				$("div.tab_cart").fadeIn();
				$("div.tab_currencies").css("display", "none");
				$("div.tab_respond").css("display", "none");
				$("#tab_cart").newsticker();
				return false;
			break;
			case "tab_currencies":
				//change status & style menu
				$("#tab_cart").removeClass("active");
				$("#tab_currencies").addClass("active");
				$("#tab_respond").removeClass("active");
				//display selected division, hide others	
				$("div.tab_cart").css("display", "none");
				$("div.tab_currencies").fadeIn();
				$("div.tab_respond").css("display", "none");
				$("#tab_currencies").newsticker();
				return false;
			break;
			case "tab_respond":
				//change status & style menu
				$("#tab_cart").removeClass("active");
				$("#tab_currencies").removeClass("active");
				$("#tab_respond").addClass("active");
				//display selected division, hide others	
				$("div.tab_cart").css("display", "none");
				$("div.tab_currencies").css("display", "none");
				$("div.tab_respond").fadeIn();
				$("#tab_respond").newsticker();
				return false;
			break;			
			/////////////////////////////////////
			
			///////////////////////////////////// категории
			case "tab_categories":
				//change status & style menu
				$("#tab_categories").addClass("active");
				$("#tab_faq").removeClass("active");
				//display selected division, hide others	
				$("div.tab_categories").fadeIn();
				$("div.tab_faq").css("display", "none");
				$("#tab_categories").newsticker();
				return false;
			break;
			case "tab_faq":
				//change status & style menu
				$("#tab_categories").removeClass("active");
				$("#tab_faq").addClass("active");
				//display selected division, hide others	
				$("div.tab_categories").css("display", "none");
				$("div.tab_faq").fadeIn();
				$("#tab_faq").newsticker();
				return false;
			break;
			/////////////////////////////////////
			
			/////////////////////////////////////  новости
			case "tab_news":
				//change status & style menu
				$("#tab_news").addClass("active");
				$("#tab_articles").removeClass("active");
				$("#tab_articles_new").removeClass("active");
				//display selected division, hide others	
				$("div.tab_news").fadeIn();
				$("div.tab_articles").css("display", "none");
				$("div.tab_articles_new").css("display", "none");
				$("#tab_news").newsticker();
				return false;
			break;		
			case "tab_articles":
				//change status & style menu
				$("#tab_news").removeClass("active");
				$("#tab_articles").addClass("active");
				$("#tab_articles_new").removeClass("active");
				//display selected division, hide others	
				$("div.tab_news").css("display", "none");
				$("div.tab_articles").fadeIn();
				$("div.tab_articles_new").css("display", "none");
				$("#tab_articles").newsticker();
				return false;
			break;
			case "tab_articles_new":
				//change status & style menu
				$("#tab_news").removeClass("active");
				$("#tab_articles").removeClass("active");
				$("#tab_articles_new").addClass("active");
				//display selected division, hide others	
				$("div.tab_news").css("display", "none");
				$("div.tab_articles").css("display", "none");
				$("div.tab_articles_new").fadeIn();
				$("#tab_articles_new").newsticker();
				return false;
			break;
			/////////////////////////
			
			///////////////////////////////////// логин
			case "tab_login":
				//change status & style menu
				$("#tab_login").addClass("active");
				$("#tab_group").removeClass("active");
				$("#tab_send").removeClass("active");
				$("#tab_partner").removeClass("active");
				//display selected division, hide others	
				$("div.tab_login").fadeIn();
				$("div.tab_group").css("display", "none");
				$("div.tab_send").css("display", "none");
				$("div.tab_partner").css("display", "none");
				$("#tab_login").newsticker();
				return false;
			break;		
			case "tab_group":
				//change status & style menu
				$("#tab_login").removeClass("active");
				$("#tab_group").addClass("active");
				$("#tab_send").removeClass("active");
				$("#tab_partner").removeClass("active");
				//display selected division, hide others	
				$("div.tab_login").css("display", "none");
				$("div.tab_group").fadeIn();
				$("div.tab_send").css("display", "none");
				$("div.tab_partner").css("display", "none");
				$("#tab_group").newsticker();
				return false;
			break;	
			case "tab_send":
				//change status & style menu
				$("#tab_login").removeClass("active");
				$("#tab_group").removeClass("active");
				$("#tab_send").addClass("active");
				$("#tab_partner").removeClass("active");
				//display selected division, hide others	
				$("div.tab_login").css("display", "none");
				$("div.tab_group").css("display", "none");
				$("div.tab_send").fadeIn();
				$("div.tab_partner").css("display", "none");
				$("#tab_send").newsticker();
				return false;
			break;	
			case "tab_partner":
				//change status & style menu
				$("#tab_login").removeClass("active");
				$("#tab_group").removeClass("active");
				$("#tab_send").removeClass("active");
				$("#tab_partner").addClass("active");
				//display selected division, hide others	
				$("div.tab_login").css("display", "none");
				$("div.tab_group").css("display", "none");
				$("div.tab_send").css("display", "none");
				$("div.tab_partner").fadeIn();
				$("#tab_partner").newsticker();
				return false;
			break;				
			/////////////////////////			
			
			/////////////////////////   поиск
			case "tab_search":
				//change status & style menu
				$("#tab_search").addClass("active");
				$("#tab_add_quick").removeClass("active");
				$("#tab_sitemap").removeClass("active");
				//display selected division, hide others	
				$("div.tab_search").fadeIn();
				$("div.tab_add_quick").css("display", "none");
				$("div.tab_sitemap").css("display", "none");
				$("#tab_search").newsticker();
				return false;
			break;		
			case "tab_add_quick":
				//change status & style menu
				$("#tab_search").removeClass("active");
				$("#tab_add_quick").addClass("active");
				$("#tab_sitemap").removeClass("active");
				//display selected division, hide others	
				$("div.tab_search").css("display", "none");
				$("div.tab_add_quick").fadeIn();
				$("div.tab_sitemap").css("display", "none");
				$("#tab_add_quick").newsticker();
				return false;
			break;
			case "tab_sitemap":
				//change status & style menu
				$("#tab_search").removeClass("active");
				$("#tab_add_quick").removeClass("active");
				$("#tab_sitemap").addClass("active");
				//display selected division, hide others	
				$("div.tab_search").css("display", "none");
				$("div.tab_add_quick").css("display", "none");
				$("div.tab_sitemap").fadeIn();
				return false;
			break;			
			/////////////////////////
			
			///////////////////////// новинки
			case "tab_whatsnew":
				//change status & style menu
				$("#tab_whatsnew").addClass("active");
				$("#tab_last_view").removeClass("active");
				//display selected division, hide others	
				$("div.tab_whatsnew").fadeIn();
				$("div.tab_last_view").css("display", "none");
				$("#tab_whatsnew").newsticker();
				return false;
			break;		
			case "tab_last_view":
				//change status & style menu
				$("#tab_whatsnew").removeClass("active");
				$("#tab_last_view").addClass("active");
				//display selected division, hide others	
				$("div.tab_whatsnew").css("display", "none");
				$("div.tab_last_view").fadeIn();
				$("#tab_last_view").newsticker();
				return false;
			break;		
			/////////////////////////			
		}
		//alert(e.target.id);
		return false;
	});
});



/* title for input */
$(document).ready(function() {
	$('input').each(function() {							   
		if($(this).val() === '') {
			$(this).val($(this).attr('title'));	
		}
		
		$(this).focus(function() {
			if($(this).val() == $(this).attr('title')) {
				$(this).val('').addClass('focused');	
			}
		});
		$(this).blur(function() {
			if($(this).val() === '') {
				$(this).val($(this).attr('title')).removeClass('focused');	
			}
		});
	});
});



})(jQuery);

(function($){
})(jQuery);