function ProductTabs(){
	
    this.init = function(){
    	(function($) {
    		var width = 0;
    		
    		$('#tabContentHolder .tabContent ').each(function(k, v) { 
    			width += $(v).outerWidth(true);
    		});
    		
    		$('#tabContentWrapper').css('width', width);
    		
    		self.show(1);
    		
    	})(jQuery);
    }

    
    this.show = function(no) {
    	(function($) {
    		
    		$('.tabTitle').each(function(k, v) { 
    			if(k + 1 == no)
    			$(v).addClass('active');
    			else
    			$(v).removeClass('active');
    			
    		});
    		
    		

    	  //scroll animation
  		  $('#tabContentWrapper').animate({
  		    marginLeft: - (no-1) * 545
  		  }, 500, function() {
  		    // Animation complete.
  		  });

    	})(jQuery);
    }
  
    
    var self = this;
}

var productTabs = new ProductTabs();

(function($) {
	
	$(document).ready(function(){
		productTabs.init();
	});

})(jQuery);
	
