$(document).ready(function(){
			
	//add words to input
	//$('input#search-box').example('Search for something...');
	
	var loadGlass = 1;
		
	$('a.zoom img').hover(function(){
		
		if(loadGlass == 1) {
		
			$('body').prepend('<img src="http://www.nouveller.com/wordpress/wp-content/themes/maroon-moon/images/icons/magnify.png" width="32" height="32" style="position: absolute;" id="magnify" />');
		
		}
		
		var p = $(this);
	
		var position = p.position();
		
		$('img#magnify').css({'top' : position.top+20, 'left' : position.left+20});
		
		$('img#magnify').show();
	
	},function(){
	
		$('img#magnify').hide();
		
		loadGlass = 2;
	
	});
	
	

	$('ul.questions li:nth-child(odd)').addClass('odd-list');

	//gets the height of the page
	var bodyheight = $('body').height();
	
	//sets a number
	var scrolltime = 7;
	
	//multiplies the body height by the scrolltime
	var scrollength = (bodyheight * scrolltime);
	
	$('h2#scroll-button').click(function(){ //$.scrollTo works EXACTLY the same way, but scrolls the whole screen
		
		$.scrollTo('#respond', scrollength);

	});
	
	

	//when a link with related class is pressed
	$("span.related").click(function () {
      	
      	//jumps up to the ul, skips to the next div
     	$(this).parents('ul').next("div.tags").toggle(); 
        
    	});
    	
    	//imitates the hover of an a tag reaction
    	$("span.related, span.share").mouseover(function(){
    	
      	$(this).css({'background-color' : '#000'});
      	$(this).css({'cursor' : 'pointer'});

    	});	
    	
    	
    	$("span.related, span.share").mouseout(function(){
    	
      	$(this).css({'background' : 'none'});

    	});
    	
    	$("span.share").click(function () {
      	
      	//jumps up to the ul, skips to the next div, then the next
    		$(this).parents('ul').next("div.tags").next("div.share-group").toggle(); 
        
    	});

	//activates the slider. must appear at the top of this file or it will break!
  	$("#slider-media").easySlider();
  	
  	/*$("#slider-photos").easySlider({ 
  		
		prevId: 'prevBtn2',
		nextId: 'nextBtn2'
  	
  	});*/

	
	// Tabs
	$('#tabs').tabs();
	
	
    	//
    	
    	/* $("div#footer-menu div.holder p").css({'opacity' : '0.5'});
    	
    	$("div#footer-menu").mouseover(function(){
    	
    		$("div#footer-menu div.holder p").css({'opacity' : '1'});
    	
    	});
    	
    	$("div#footer-menu").mouseout(function(){
    	
    		$("div#footer-menu div.holder p").css({'opacity' : '0.5'});
    	
    	}); */
	

});