var opened=true;

$(function(){
setSwicther();
$('#styleSwitcher').corner("tr br");

//fix the IE6 position fixed issue
if ($.browser.msie && $.browser.version.substr(0, 1) < 7) {
	$("#styleSwitcher").css("position", "absolute");
	$(window).scroll(function() {
		$("#styleSwitcher").css("top", $(window).scrollTop() + "px");
	});
}
});

function setSwicther(){
	
	$('#switcher_btn').click(function(){
		if(opened){
			$('#styleSwitcher').animate({marginLeft:-102});
			$('#switcher_btn').css({backgroundPosition: '0px -29px'});
			opened=false;
		}else{
			$('#styleSwitcher').animate({marginLeft:0});
			$('#switcher_btn').css({backgroundPosition: '0px 0px'});
			opened=true;
		}
	});
	
	$('#switcher_btn').mouseover(function(){
		$(this).css({cursor:'pointer'});	
	});
}


