/**
 * @author dan
 */
$(document).ready(function () {
	browser = false;
	jQuery.each(jQuery.browser, function(i) {
	  	if(!$.browser.msie){	
			browser = true;}
	});
	
	if(browser){
		$("#dropmenu li>ul").prepend('<li class="page_item menu-top"><a href="javascript"></a></li>');
	}
	
	$("#dropmenu ul").css({display: "none"}); // Opera Fix
	$("#dropmenu li").hover(function(){
		$(this).find('ul:first').css({visibility: "visible",display: "none"}).show(500);
	},function(){
		$(this).find('ul:first').css({visibility: "hidden"});
	});
		
	if(jQuery.url.attr("anchor") != null){
		$("#contact-form-container").animate({
			height: "270px"
		}, {
			queue: false,
			duration: 1000
		}).addClass('show')
	}
	
    $("#contact-us").bind("click", function(e){
		contactForm();
		
    });
	
	$("#contact-us-footer").bind("click", function(e){
		contactForm();
		
    });
	
	pageHeight();
	lookAround()
});

function contactForm() 
{
	if ($("#contact-form-container").hasClass('show')) {
		$("#contact-form-container").animate({
			height: "0px"
		}, {
			queue: false,
			duration: 1000
		}).removeClass('show')
	}
	else {
		$("#contact-form-container").animate({
			height: "270px"
		}, {
			queue: false,
			duration: 1000
		}).addClass('show')
	}
}

function pageHeight()
{
	
	if(($('#header-section').height() + $('#body-section').height() + 57) < $(window).height()){
		
		//alert(($('#header-section').height() + $('#body-section').height()) +" > "+ $(window).height())
		bodyHeight = $(window).height() - $('#header-section').height();
	
		$('#body-section').css('height',(bodyHeight-80))
	}
	
	
}

function lookAround(){
	
	$('.look-around-btn').each(function(index) {
		
			$(this).click(function() {
				name = $(this).attr('id')
				
				$('#'+name+'-img').toggle();
				
				
				});
		
		});
	
	
}
