var yaxis = 0;
$(document).ready(function(){
	// For Back to top part start....................
	main();
	$(".menu2 a").append("<em></em>");
	
	$(".menu2 a").hover(function(e) {
		if($(window).scrollTop() < 722 || $(window).scrollTop() > 724)
		{
			$(this).find("em").animate({opacity: "show", top: "123"}, "slow");
			var hoverText = $(this).attr("title");
	    	$(this).find("em").text(hoverText);
			$(this).css('cursor','pointer');
		}
		else
		{
			$(this).css('cursor','default');	
		}
	}, function() {
		$(this).find("em").animate({opacity: "hide", top: "123"}, "fast");
	});

	// For Back to top part end....................
	
	// For Wallpaper start....................
		wallpaper();
	// For Wallpaper end....................
	
	// tool tip start-------
	$("a#discover-process[title]").tooltip_new({tip: '.toolTips', offset: [10,-38], effect: 'slide', slideInSpeed: 500, slideOutSpeed: 500});
	//tool tips end
	
	// For Portfolio start....................
		portfolio()
	// For Portfolio end....................
	
	$('.select_design_list').hide();
	$('.select_design a').click(function(){
		$('.select_design_list').slideToggle('750');
		$('.designCategoryButton').find('a').addClass('active');
	});
	$('.select_design').mouseleave(function(){
		$('.select_design_list').slideUp('750');
		$('.designCategoryButton').find('a').removeClass('active');
		
	});
	
	// For light box start....................
		$(function() {
			$('#wallpaper_display ul li div a').lightBox();
		});
		
	// For light box start....................
	$(function() {
			$('#portfolio_display ul li a').lightBox();
		});
});

function main()
{
	var height = window.innerHeight == undefined ? document.documentElement.clientHeight : window.innerHeight;
	yaxis = (height-20)-145;
	$("#backtotop").makeFloat({x:"current",y:yaxis});
}
function getScrollHeight()
{
   var h = window.pageYOffset ||
           document.body.scrollTop ||
           document.documentElement.scrollTop;
           
   return h ? h : 0;
}

