	// Category nav drop down 
	function toggle_slide(id_name) {
		jQuery('#'+id_name).slideToggle('fast');// open/close slide menu
	}
		
	// last li menu border 
		$(document).ready(function() {
		$("#dropmenu li:last").addClass("last");
		});	
		
	// floating share box 
		$(function() {
			 var offset = $(".expand").offset();
			 var topPadding = 40;
			 $(window).scroll(function() {
				 if ($(window).scrollTop() > offset.top) {
					 $(".expand").stop().animate({
						 marginTop: $(window).scrollTop() - offset.top + topPadding
					 });
				 } else {
					 $(".expand").stop().animate({
						 marginTop: 0
					 });
				 };
			 });
		 });

	// contact form validator 
		$(document).ready(function(){
			$("#contactForm").validate();
		});	
		
		// contact widges same height
		function equalHeight(group) {
		   tallest = 0;
		   group.each(function() {
			  thisHeight = $(this).height();
			  if(thisHeight > tallest) {
				 tallest = thisHeight;
			  }
		   });
		   group.height(tallest);
		}
		
		$(document).ready(function() {
		   equalHeight($(".grid_3_widget_sidebar, .grid_4"));
		});	
		
		// page widges same height
		function equalHeight(group) {
		   tallest = 0;
		   group.each(function() {
			  thisHeight = $(this).height();
			  if(thisHeight > tallest) {
				 tallest = thisHeight;
			  }
		   });
		   group.height(tallest);
		}
		
		$(document).ready(function() {
		   equalHeight($(".grid_3_widget"));
		});	
		
		// footer columns same height
		function equalHeight(group) {
		   tallest = 0;
		   group.each(function() {
			  thisHeight = $(this).height();
			  if(thisHeight > tallest) {
				 tallest = thisHeight;
			  }
		   });
		   group.height(tallest);
		}
		
		$(document).ready(function() {
		   equalHeight($(".grid_3_footer_widget"));
		});	
		
		
// last list item ...  
	$(document).ready(function() {
	$("ul.tags li:last-child").addClass("last");
	$(".widget ul li:last-child").addClass("last");
	$("#recentcomments li:last-child").addClass("last");
	});	
	
// options
	$(document).ready(function() {
		var hideit = function(e, ui) { $(this).val('#'+ui.hex); $('.ui-colorpicker').css('display', 'none'); };
		$('#bg #colorpicker').colorpicker({ hide: hideit, submit: hideit });

		$('#dochange').click(function() {

			$('.container_12, .copyright, .newsletter').css('background-color', $('#tf_content_color').val()); Cufon.refresh();
			$('#menu li li a, #menu li li a:link, #menu li li a:visited, #menu li a, #menu li a:link, #menu li a:visited, #menu_categories .catcol ul li.maincat a, .button-cat').css('color', $('#tf_menu_color').val());Cufon.refresh();
			$('body, .mybox, .widgettitle, .small h5, .one h5, .two h5, .three h5, .four h5, .five h5, .six h5, .seven h5, .grid_3_widget_sidebar, .recentcomments').css('color', $('#tf_text_color').val()); Cufon.refresh();
			$('.article p.meta, .bottom-pagenav, .copyright ,#bottom-menu .button-cat a, #bottom-menu .button-cat a:link,#bottom-menu .button-cat a:visited, .bottom-pagenav li a:link, .bottom-pagenav li a:hover, .bottom-pagenav li a:active, .bottom-pagenav li a:visited, comment-icon, .grey a, .grey a:link, .grey a:visited, .comment-icon a,.feed-label a, ul.tags li a, .intro a, .twitter a, .article-inside a, .widget ul li a:link, .widget ul li a:hover, .widget ul li a:visited, .article a, .widget-intro a, #respond a, .archive-img a').css('color', $('#tf_link_color').val()); Cufon.refresh();
			$('.paginator .scroll_thumb, .paginator span strong').css('background-color', $('#tf_link_color').val()); Cufon.refresh();
			$('body, .mybox').css('background-color', $('#tf_body_color').val()); Cufon.refresh();
			$('#mail, #email, #contactName, #url, #author, #comment, #s, .email, #contactForm textarea, .grid_3_widget_sidebar, .grid_3_widget').css('background-color', $('#tf_form_color').val()); Cufon.refresh();
			$('#searchsubmit, .submit, #contactForm input[type="submit"], #submit').css('background-color', $('#tf_submit_color').val()); Cufon.refresh();
			return false;
				
		});
       
	});
	
// sliding colors
		
	$(function() {
		$('#switcher a').stop().animate({'marginLeft':'-95px'},1000);

		$('#switcher > li').hover(
			function () {
				$('a',$(this)).stop().animate({'marginLeft':'-10px'},200);
			}
		);
		$('#switcher > li').click(
			function () {
				$('a',$(this)).stop().animate({'marginLeft':'-95px'},200);
			}
		);
							
		var $box = $('#switcher a');
			$(document.body).click(function(){
			if (!$box.has(this).length) { // if the click was not within $box
			$box.stop().animate({'marginLeft':'-95px'},200);
			}
		});
	});

