	//REMOVE TITLE ATTRIBUTE
	jQuery("#dropmenu a").removeAttr("title");
	
	//MENU
	jQuery("#dropmenu ul").css("display", "none"); // Opera Fix
	jQuery("#dropmenu li").hover(function(){
		jQuery(this).find('ul:first').stop(true,true).slideDown(100);
		},function(){
		jQuery(this).find('ul:first').hide();
	});
	jQuery("#dropmenu ul").parent().children("a").append("<span>&nbsp;&nbsp;+</span>");
	
	jQuery("#dropmenu ul li a").hover(function(){
		jQuery(this).stop(true,true).animate({paddingLeft:"20px"},300);
	},function(){
		jQuery(this).stop(true,true).animate({paddingLeft:"15px"},300);
	});
	
	jQuery("#selectMenu").change(function() {
  		window.location = jQuery(this).find("option:selected").val();
	});
	
	//WIDGET PANEL STUFF
	var sidebar = jQuery("#sidebar");
	
	jQuery("#header").append("<div id='sideToggle'>+</div>");
	jQuery("#sideToggle").click(function(){
		if(jQuery(this).hasClass('open')){
			jQuery(this).html('+');
		} else {
			jQuery(this).html('&times;');
		}
		jQuery(this).toggleClass('open');
		sidebar.toggleClass('open').slideToggle(350);
	});	
	jQuery("#closeSidebar").click(function(){
		jQuery("#sideToggle").removeClass('open').html('+');
		jQuery("#sidebar").removeClass('open');
		sidebar.slideUp(350);
		jQuery("html,body").animate({scrollTop:0},350);
	});	
	var sidebarTop = jQuery('#content').position().top;
	
	//FIX ADDITIONAL ROWS OF WIDGETS	
	jQuery('.widget:nth-child(3n+1)').css({clear:"left"});
	
	//FIX ADDITIONAL ROWS OF POSTS	
	jQuery('.listing .post:nth-child(2n+1)').css({clear:"left"});
	
	//ERROR & SEARCH PAGE OPENS WIDGET PANEL	
	jQuery('body.error404 #sideToggle,body.search-no-results #sideToggle').click();
		
	//BACK TO TOP STUFF
	jQuery("#backTop").click(function(){
		jQuery("html,body").animate({scrollTop:0},499);
	});
	jQuery(document).scroll(function(){
		if(jQuery(document).scrollTop()>0){
			jQuery("#backTop").stop(true,true).slideDown(200);
		} else {
			jQuery("#backTop").stop(true,true).slideUp(200);
		}
	});
	
	//COMMENT TOGGLE
	jQuery('#commentToggle').click(function(){
		jQuery('#toggleComments').slideToggle(500);
	});
    if (/#respond/.test(window.location)) {
    	jQuery('#toggleComments').show();
    }    

	//PRETTY PHOTO
	jQuery("a[href$='jpg'],a[href$='png'],a[href$='gif']").attr({rel: "prettyPhoto"});
	jQuery(".gallery-icon > a[href$='jpg'],.gallery-icon > a[href$='png'],.gallery-icon > a[href$='gif']").attr({rel: "prettyPhoto[pp_gal]"});
	jQuery("a[rel^='prettyPhoto']").prettyPhoto({
		animation_speed: 'normal', // fast/slow/normal 
		opacity: 0.35, // Value betwee 0 and 1 
		show_title: false, // true/false 
		allow_resize: true, // true/false 
		overlay_gallery: false,
		counter_separator_label: ' of ', // The separator for the gallery counter 1 "of" 2 
		//theme: 'light_square', // light_rounded / dark_rounded / light_square / dark_square 
		hideflash: true, // Hides all the flash object on a page, set to TRUE if flash appears over prettyPhoto 
		modal: false // If set to true, only the close button will close the window 
	});
	
	//THE END
	function theend(){
		if(jQuery(".listing .post").length == 1){
			jQuery(".listing .post").after("<div class='post' id='theEnd'>The End</div>");
		}
	}
	theend();
	
	//AJAX STUFF
	jQuery("div.pagenav a").live('click',function() {    
		var url = jQuery(this).attr('href'),
			height = jQuery("#main").outerHeight();
		
		jQuery("#content").css({height:height});
		
		jQuery("html,body").animate({scrollTop:0},500);	
		
		if(jQuery(this).attr("class") == "nextpostslink"){
			var peelClass = "right";
		} else {
			var peelClass = "left";
		}
    	jQuery("#main").fadeOut(500,function(){
    		jQuery("#content").html("<div id='loading'>Loading</div>").load(url + " #main",'', function() {
    			theend();
        		jQuery("#main").hide().fadeIn(500);
        		jQuery(this).css({height:"auto"});
       		});
    	});
    	return false;
	});
	jQuery(".postinate a").live('click',function() {    
		var url = jQuery(this).attr('href'),
			height = jQuery("#entryContainer").outerHeight(),
			entryTop = jQuery("#entryContainer").position().top;
				
		jQuery("#entryContainer").css({height:height});	
		
		jQuery("html,body").animate({scrollTop:entryTop},500);
		
    	jQuery(".entry").fadeOut(500,function(){
    		jQuery("#entryContainer").html("<div id='loading'>Loading</div>").load(url + " .entry",'', function() {
        		jQuery(".entry").hide().fadeIn(500);
        		jQuery(this).css({height:"auto"});
       		});
    	});
    	return false;
	});
	
	//KEYS PRESS...
	jQuery(document).keydown(function(e){
		//LEFT KEY...
		if (e.keyCode == 37) {
			jQuery('.postinate > span').prev('a').click();
			jQuery('a.previouspostslink').click();
		}
		//UP KEY...
		if (e.keyCode == 38) {}
		//RIGHT KEY...
		if (e.keyCode == 39) {
			jQuery('.postinate > span').next('a').click();
			jQuery('a.nextpostslink').click();
		}
   		//DOWN KEY...
		if (e.keyCode == 40) {}
		//SPACEBAR...
		if (e.keyCode == 32) {}
	});
	
	//MESH BACKGROUND STUFF
	function docHeight(){
		var documentHeight = jQuery(document).height();
		jQuery("#mesh").css({height:documentHeight});		
	}
	jQuery(document).ready(function(){
	docHeight();
	});
	jQuery(window).resize(function(){
		docHeight();
	});
		
	//ZOOMING STUFF
	jQuery("body.single .postInfo, body.page .entrytitle").not("body.page-template-t-tags-php .entrytitle").after("<div id='zoom'><div id='zoomInfo'>Focus Mode</div></div>");
	jQuery("#zoom").click(function(){
		jQuery(this).toggleClass('zoomed');
		jQuery("#mesh,#backstretch,a[rel~='prev'],a[rel~='next']").fadeToggle(1200);
		jQuery("#header,#footer, #sidebar.open").slideToggle(1200);
		jQuery("html,body").animate({scrollTop:0},1200);
	}).hover(function(){
    	jQuery('#zoomInfo').fadeIn({ duration: 200, queue: false }).animate({bottom:"22px"},{duration:200,queue:false});
    },function(){
      	jQuery('#zoomInfo').stop(true,true).fadeOut(200,function(){jQuery(this).css({bottom:"0"})});
    });
	
	//INDEX PAGE STUFF
	jQuery("#tagList a").hover(function(){
		jQuery(this).stop(true,true).animate({paddingLeft:"5px"},300);
	},function(){
		jQuery(this).stop(true,true).animate({paddingLeft:"0px"},300);
	});
