// JavaScript Document

$(document).ready(function(){
	
/* slideToggle */
	$(".container").hide();
	$("h2.trigger").click(function(){
		$(this).toggleClass("active").next().slideToggle("slow");
		return false; 
	});

/* banner */
	$('#banner').tinycarousel({ pager: true, interval: true  });

	
/* project Gallery */	
	/*EDIT 21 MAY 2011*/
	$('.photoGallery a').click(function()
		{	
			var str ="." + $(this).attr('rel');
			$(this).parents(".productBox").find(".photoView").find("img").hide();
			$(this).parents(".photoGallery").find("li").removeClass("active");
			$(this).parent("li").addClass("active");
			$(this).parents('.productBox').find('.photoView').find(str).show();	
			
		});
	/* END  21 MAY 2011*/

	var tabpanel = $('div.tabcontent');
		var thisTabActive ="#" + $("#mainNavigation a.active").attr('rev');	
		tabpanel.hide().filter(thisTabActive).show();
		
		$('#mainNavigation a').hover(function(){
			tabpanel.hide();
			var thisConte ="#" + $(this).attr('rev');	
			tabpanel.filter(thisConte).show();
			
		 return false;
		},function(){
			var thisTabActive ="#" + $("#mainNavigation a.active").attr('rev');	
			tabpanel.hide().filter(thisTabActive).show();	
		});



});

