jQuery.noConflict();

jQuery(document).ready(function() {
	
	// Expand Panel
	jQuery("#open").click(function(){
		jQuery("div#toppanel").css('z-index', '999');
		jQuery("div#panel").slideDown("slow");	
	});	
	
	// Collapse Panel
	jQuery("#close").click(function(){
		jQuery("div#panel").slideUp("slow", function (){
			jQuery("div#toppanel").css('z-index', '1');
		});	
	});		
	
	// Switch buttons from "Log In | Register" to "Close Panel" on click
	jQuery("#toggle a.plinks").click(function () {
		jQuery("#toggle a.plinks").toggle();
	});		
	
 
	jQuery(".plus-tab").toggle(function(){
		jQuery(this).addClass("active"); 
	}, function () {
		jQuery(this).removeClass("active");
	});
	
	jQuery(".plus-tab").click(function(){
		jQuery(this).next(".blog-meta-tags").slideToggle("slow,");
	});
	
	jQuery(".searcharea").click(function(e) {          
		e.preventDefault();
		jQuery("fieldset#searcharea_menu").toggle();
		jQuery(".searcharea").toggleClass("menu-open");
	});
	
	jQuery("fieldset#searcharea_menu").mouseup(function() {
		return false
	});
	jQuery(document).mouseup(function(e) {
		if(jQuery(e.target).parent("a.searcharea").length==0) {
			jQuery(".searcharea").removeClass("menu-open");
			jQuery("fieldset#searcharea_menu").hide();
		}
	});	
	
	// Reset Font Size
	var originalFontSize = jQuery('.post-body').css('font-size');
	jQuery(".resetFont").click(function(){
		jQuery('.entry').css('font-size', originalFontSize);
	});
	// Increase Font Size
	jQuery(".fontSize .larger").click(function(){
		var currentFontSize = jQuery('.entry').css('font-size');
		var currentFontSizeNum = parseFloat(currentFontSize, 10);
		var newFontSize = currentFontSizeNum*1.2;
		jQuery('.entry').css('font-size', newFontSize);
		return false;
	});
	// Decrease Font Size
	jQuery(".fontSize .smaller").click(function(){
		var currentFontSize = jQuery('.entry').css('font-size');
		var currentFontSizeNum = parseFloat(currentFontSize, 10);
		var newFontSize = currentFontSizeNum*0.8;
		jQuery('.entry').css('font-size', newFontSize);
		return false;
	});
	
});

jQuery (function (){
	jQuery("ul#topNav li").hover (function (){
		jQuery(this).addClass('hover');
    },function (){
		jQuery(this).removeClass('hover');
    });
	
	var tabContainers = jQuery('div#ajaxContent > div');
	tabContainers.hide().filter(':first').show();

	jQuery('ul#ajaxTab li').click(function () {
		tabContainers.hide();
		tabContainers.filter("#container_" + jQuery (this).attr("id")).show();
		jQuery('ul#ajaxTab li').removeClass('selected');
		jQuery(this).addClass('selected');
		return false;
	}).filter(':first').click();
	
	jQuery (".footerArea .fCol").each (function (){ jQuery(this).find("li:last").css ('border-bottom-width', '0px'); });
	
	jQuery(".featEChoice .feat .firstBlock .image, .eCPost .image, .hCPost .image, .lCPost .image, .lCPost2 .image").hover(function() {
		jQuery(this).css({'z-index' : '10'});
		jQuery(this).find('img').addClass("hover").stop()
			.animate({
				top: '-20px', 
				left: '-20px', 
				padding: '20px' 
			}, 200);
		
		} , function() {
		jQuery(this).css({'z-index' : '0'});
		jQuery(this).find('img').removeClass("hover").stop()
			.animate({
				top: '0', 
				left: '0', 
				padding: '0px'
			}, 400);
	});
	 
	
	
	ddsmoothmenu.init({
		mainmenuid: "smoothmenu1", //menu DIV id
		orientation: 'h', //Horizontal or vertical menu: Set to "h" or "v"
		classname: 'ddsmoothmenu', //class added to menu's outer DIV
		contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
	})
	
	jQuery("#content img").lazyload({
        effect : "fadeIn"
    });
	
});