$(function() {


	//stick the footer at the bottom of the page if we're on an iPad/iPhone due to viewport/page bugs in mobile webkit
	if(navigator.platform == 'iPad' || navigator.platform == 'iPhone' || navigator.platform == 'iPod'){
		$("#footer_bar").css("position", "absolute");
	};
	
	// Fix for drop down menu in IE
	$('#cssdropdown li.headlink').hover(function() {
		$('ul', this).css('display', 'block');
	}, function() {
		$('ul', this).css('display', 'none');
	});
	

	$('a.gototop').click(function(){
		 $('html, body').animate({scrollTop: '0px'}, 500);
		 e.preventDefault();
	});


	// Animated buttons along bottom of page
	$('#client_login-button').click(function () {
		window.location = $(this).find("a").attr("href");
		e.preventDefault();
	});		
	$('#client_login-button').hover(function () {
		$(this).css("backgroundColor", "#DBA614");
		$(this).stop().animate({bottom: '0'}, {queue:false, duration:100});
	}, function () {
		$(this).css("backgroundColor", "#f0f0f0");
		$(this).animate({bottom: '-10px'}, {queue:false, duration:50});	
	});		

	$('#facebook-button').click(function () {
		window.location = $(this).find("a").attr("href");
		e.preventDefault();
	});		
	$('#facebook-button').hover(function () {
		$(this).css("backgroundColor", "#DBA614");
		$(this).stop().animate({bottom: '0'}, {queue:false, duration:100});
	}, function () {
		$(this).css("backgroundColor", "#f0f0f0");
		$(this).animate({bottom: '-10px'}, {queue:false, duration:50});	
	});	
	
	$('#contact-button').click(function () {
		window.location = $(this).find("a").attr("href");
		e.preventDefault();
	});		
	$('#contact-button').hover(function () {
		$(this).css("backgroundColor", "#DBA614");
		$(this).stop().animate({bottom: '0'}, {queue:false, duration:100});
	}, function () {
		$(this).css("backgroundColor", "#f0f0f0");
		$(this).animate({bottom: '-10px'}, {queue:false, duration:50});	
	});	



	$('#vendor-button').click(function () {
		window.location = $(this).find("a").attr("href");
		e.preventDefault();
	});		
	$('#vendor-button').hover(function () {
		$(this).css("backgroundColor", "#DBA614");
		$(this).stop().animate({bottom: '0'}, {queue:false, duration:100});
	}, function () {
		$(this).css("backgroundColor", "#f0f0f0");					
		$(this).animate({bottom: '-10px'}, {queue:false, duration:50});
	});	

	// Client Preview Gallery Functionality
	$('.cp_tncell').click(function () {
		window.location = $(this).find("a").attr("href");
		e.preventDefault();
	});		
	$('.cp_tncell').hover(function () {
		$(this).addClass("cp_hilight");
	}, function () {
		$(this).removeClass("cp_hilight");
	});	
	
	$('#cp_prev,#cp_next').click(function () {
		window.location = $(this).find("a").attr("href");
		e.preventDefault();
	});		
	$('.cp_imgcell2').hover(function () {
		$(this).addClass("cp_hilight");
	}, function () {
		$(this).removeClass("cp_hilight");
	});	
	
	
	// Wedding Vendor Page

	$('.vendorbox').hover(function () {
		$(this).addClass("blockhilight");
	}, function () {
		$(this).removeClass("blockhilight");
	});	
	
});











