$(document).ready(function()
{
	<!--//---------------------------------+
	//  Developed by Roshan Bhattarai 
	//  Visit http://roshanbh.com.np for this script and more.
	//  Slides the element with class 'menu_body' when paragraph with class 'menu_head' is clicked 
	$('#mainMenu .menu_head').click(function(){
		//$(this).next('div.menu_body').slideToggle(300).siblings('div.menu_body').slideUp(300);
		$(this).next('div.menu_body').slideToggle(500);
	});
		// --------------------------------->
	
	//  Slides the element with class 'more_screens' when anchor class 'more' is clicked 
	$('.work .more').click(function(){
		//console.log($(this).closest('.work').find('.small_screens'));
		$(this).closest('.work').find('.small_screens').slideToggle(250);
		if($(this).text() == 'more [+]')
		{
			$(this).html('more [-]');
		}else{
			$(this).html('more [+]');
		}
		
	});
	
	
	menuImage = new Image(); 
	menuImage.src = '_images/fork.gif';

	Cufon.replace('h1');
	Cufon.replace('.menu_and');
	Cufon.replace('.menu_head');
	
	
	//Cufon.replace('.anchorLink, .twitter, .footer', { fontFamily: 'ant-cond-light'});

	// $("img").lazyload();
	// $("img").lazyload({ placeholder : "_images/background-iphone.gif" });
	// $("img").lazyload({ threshold : 300 });
	// $("img").lazyload({ 
	//     placeholder : "_images/clear.gif",
	//     effect : "fadeIn"
	// });

	

	$('.anchorLink').hover(function(e) {
		$(this).css({'color' : '#f1ece5'});
		// Cufon(this, {
		// 	color : '#000000'
		// });
	}, function() {
		if($(this).hasClass('unselected'))
		{
			$(this).css({'color' : '#716957'});
		}
	});	
	
	$('.anchorLink').click(function(){
		changeColor(this);
	});
	
	//change css on click
	function changeColor(link){
		//console.log(link);
		$('.anchorLink').removeClass('selected_style');
		$('.anchorLink').not(link).addClass('unselected');
		$(link).removeClass('unselected');
		$(link).addClass('selected_style');
		$('.anchorLink').css({'color' : '#716957'});
		$(link).css({'color' : '#716957'});
		
		// Cufon('.anchorLink', {
		// 	color : '#697371',
		// });
		// 
		// Cufon(link, {
		// 	color : '#000000'
		// });
	}	

	var loc = document.location.href;
	var hash = loc.indexOf('#');
	if(hash > -1) {
		hash = document.location.href.substr(hash, document.location.href.length);
		//console.log(hash);
	} else {
		//console.log('nothing was found');
		hash = false;
	}

	//auto highlight anchor on deep link
	//console.log(hash);
	if(hash) {
	 	$('a[href='+hash+']').closest('.menu_body').prev().click();
	 	//$('a[href='+hash+']').closest('.menu_head').click();
		//console.log($('a[href='+hash+']').closest('.menu_head'));
		$('a[href='+hash+']').click();
	} else {
		$('.menu_head').eq(0).click().parent().find('.unselected.anchorLink').eq(0).click();	
	}


});// JavaScript Document
