$(document).ready(function() {
	$("div.panel_button").click(function(){
		$("div#panel").animate({
			left: "0px"
		}, "fast");
		$(".panel_button").animate({
			left: "150px"
		}, "fast");
		$("div.panel_button").toggle();
	});	
   $("div.hide_button").click(function(){
		$("div#panel").animate({
			left: "-150px"
		}, "fast");
		$(".panel_button").animate({
			left: "0px"
		}, "fast");
   });

	$('#jscolorInput2').change(function() {
		var color = '#'+$(this).val();
		$('style#contentcolor').text('.showcase-item h3, h1.title, #simple-tabs ul.tabs li.active a, .tabs-clean-style ul.tabs li.active a, .intro-text, .feature-item h3 {color:' + color + '; }    .plusSlider-controls a, ::-moz-selection, ::selection, input[type=submit], button {background:' + color + '; }   .readon {background-color: ' + color + '; }  img.shadow:hover {-moz-box-shadow: 0 0 5px ' + color + ';-webkit-box-shadow: 0 0 5px ' + color + '; box-shadow: 0 0 5px ' + color + '; border: 1px solid ' + color + ';}   input[type=text]:focus, input[type=password]:focus, textarea:focus, select:focus { -moz-box-shadow: 0 0 3px ' + color + ';-webkit-box-shadow: 0 0 3px ' + color + '; box-shadow: 0 0 3px ' + color + '; border: 1px solid ' + color + '; } ');
		$('style#general_presets').text('');
	});
	$('#jscolorInput3').change(function() {
		var color = '#'+$(this).val();
		$('style#slideshowcolor').text('#slideshow {background-color:' + color + '; }');
		$('style#general_presets').text('');
	});
	$('#jscolorInput4').change(function() {
		var color = '#'+$(this).val();
		$('style#bottomcolor').text('#rt-bottom {background-color:' + color + '; }');
		$('style#general_presets').text('');
	});
	$('#jscolorInput5').change(function() {
		var color = '#'+$(this).val();
		$('style#footercolor').text('#rt-footer {background-color:' + color + '; }');
		$('style#general_presets').text('');
	});
	$('#jscolorInput6').change(function() {
		var color = '#'+$(this).val();
		$('style#linkcolor').text('body a {color:' + color + '; }');
		$('style#general_presets').text('');
	});
	
	$('.presets li').click(function() {
		var prs_color = $(this).css('background-color');
		$('style#general_presets').text('.showcase-item h3, h1.title, #simple-tabs ul.tabs li.active a, .tabs-clean-style ul.tabs li.active a, .intro-text, .feature-item h3 {color:' + prs_color + '; }    .plusSlider-controls a, ::-moz-selection, ::selection, input[type=submit], button {background:' + prs_color + '; }   .readon {background-color: ' + prs_color + '; }  img.shadow:hover {-moz-box-shadow: 0 0 5px ' + prs_color + ';-webkit-box-shadow: 0 0 5px ' + prs_color + '; box-shadow: 0 0 5px ' + prs_color + '; border: 1px solid ' + prs_color + ';}   input[type=text]:focus, input[type=password]:focus, textarea:focus, select:focus { -moz-box-shadow: 0 0 3px ' + prs_color + ';-webkit-box-shadow: 0 0 3px ' + prs_color + '; box-shadow: 0 0 3px ' + prs_color + '; border: 1px solid ' + prs_color + '; }   #slideshow {background-color:' + prs_color + '; }    body a {color:' + prs_color + '; }');
	});
	
	$('#headers').change(function() {
		var style = $(this).val();
		$('#rt-header').attr('class',style);
	})
	
	$('#font_list').change(function(){
		var fontval = $("#font_list option:selected").val();
		var fontname = $("#font_list option:selected").text();
		$('link#google_font').attr({href:'http://fonts.googleapis.com/css?family=' + fontval + ':regular,italic,bold,bolditalic'});
		$('style#font_styles').text('h1, h2, h3, h4, h5, h6, .readon, .error404, .pricing-table .box .title, .swapper h3, #quote_wrap blockquote h6, #top-link { font-family:"' + fontname + '", Arial, sans-serif; }');
	});
	
	
	
});

