$(document).ready(function(){
	/* Set styles for current tab */
	var currentTab = $('.tab[@current=true]');
	if(currentTab != null) {
		$('.tab-left',currentTab).addClass('tab-left-hover');
		$('.tab-right',currentTab).addClass('tab-right-hover');
	}
	
	/* Set rollover for tabs */
	$('.tab').hover(function(){
		if($(this).attr('current') == null) {
   			$('.tab-left',this).addClass('tab-left-hover');
   			$('.tab-right',this).addClass('tab-right-hover');
		}
 	},function(){
 		if($(this).attr('current') == null) {
	 		$('.tab-left',this).removeClass('tab-left-hover');
	   		$('.tab-right',this).removeClass('tab-right-hover');
 		}
 	});
 	
 	/* Set click for tabs */
 	$('.tab').click(function() {
 		var link = $('.tab-left a', this).attr('href');
 		if(link != null) {
 			document.location = link;
 		}
 	});
});