Cufon.replace('.left_menu a,#content h3,.title,.page_content h1,h1.headline,#reply-title', { hover: 'true' });
jQuery(document).ready(function($){
	jQuery('.boxgrid.caption').hover(function(){
		jQuery(".cover", this).stop().animate({top:'0px'},{queue:false,duration:300});
	}, function() {
		jQuery(".cover", this).stop().animate({top:'185px'},{queue:false,duration:300});
	});
});
jQuery(window).load(function() {
    jQuery('#slider').nivoSlider({
        effect:'random', //Specify sets like: 'fold,fade,sliceDown'
        slices:20,
        animSpeed:1000, //Slide transition speed
        pauseTime:5000,
        startSlide:0, //Set starting Slide (0 index)
        directionNav:false, //Next & Prev
        directionNavHide:false, //Only show on hover
        controlNav:false, //1,2,3...
        controlNavThumbs:false, //Use thumbnails for Control Nav
        controlNavThumbsFromRel:false, //Use image rel for thumbs
        controlNavThumbsSearch: '.jpg', //Replace this with...
        controlNavThumbsReplace: '_thumb.jpg', //...this in thumb Image src
        keyboardNav:true, //Use left & right arrows
        pauseOnHover:true, //Stop animation while hovering
        manualAdvance:false, //Force manual transitions
        captionOpacity:0.8, //Universal caption opacity
        beforeChange: function(){},
        afterChange: function(){},
        slideshowEnd: function(){}, //Triggers after all slides have been shown
        lastSlide: function(){}, //Triggers when last slide is shown
        afterLoad: function(slider, kids, settings, vars){} //Triggers when slider has loaded
    });
});
jQuery(document).ready(function(){
jQuery(".left_menu ul ").css({display: "none"}); // Opera Fix
jQuery(".left_menu li ").hover(function(){
    jQuery(this).find('ul:first').css({visibility: "visible",display: "none"}).slideDown('300');
    },function(){
    jQuery(this).find('ul:first').css({visibility: "hidden"});
    });   
});
jQuery(document).ready(function(){
jQuery(".menu ul ").css({display: "none"}); // Opera Fix
jQuery(".menu li ").hover(function(){
    jQuery(this).find('ul:first').css({visibility: "visible",display: "none"}).slideDown('300');
    },function(){
    jQuery(this).find('ul:first').css({visibility: "hidden"});
    });   
});
jQuery(function() {
	jQuery(".slider2").jCarouselLite({
		btnNext: ".next2",
		btnPrev: ".prev2",
		visible: 5
	});
});
jQuery(function($) {
	// run the code in the markup!
	jQuery('pre code').each(function() {
		eval(jQuery(this).text());
	});
});
//comment
jQuery(document).ready(function () {
	jQuery('#commentform input, #commentform textarea,#contact_form input,#contact_form textarea').each(function () {
		if (jQuery(this).val() == '') {
			jQuery(this).val(jQuery(this).attr('defaultvalue'));
		}
	}).focus(function () {
		jQuery(this).removeClass('inputerror');
		if (jQuery(this).val() == jQuery(this).attr('defaultvalue')) {
			jQuery(this).val('');
		}
	}).blur(function () {
		if (jQuery(this).val() == '') {
			jQuery(this).val(jQuery(this).attr('defaultvalue'));
		}
	});
	jQuery('#commentform').submit(function () {
		jQuery('#submiterror').remove();
		var errors = 0;
		jQuery(this).find('textarea, input').each(function () {
			if (jQuery(this).val() == jQuery(this).attr('defaultvalue')) {
				jQuery(this).val('');
			}
			if (jQuery(this).hasClass('required') && jQuery(this).val() == '') {
				jQuery(this).addClass('inputerror');
				errors++;
			}
		});

		if (errors > 0) {
			jQuery(this).find('textarea, input').each(function () {
				if (jQuery(this).val() == '') {
					jQuery(this).val(jQuery(this).attr('defaultvalue'));
				}
			});
			jQuery(this).prepend('<div id="submiterror">Please complete the highlighted fields.</div>');
			return false;
		}
		return true;
	});
});
// equal height
function equalHeight(group) {
	tallest = 0;
	group.each(function() {
		thisHeight = jQuery(this).height();
		if(thisHeight > tallest) {
			tallest = thisHeight;
		}
	});
	group.height(tallest);
}
jQuery(document).ready(function($) {
    equalHeight(jQuery(".blog_content"));
});
