$(document).ready(function() {
	$('#logo').hide();
	$('#logoBG').hide();
	$('#content').hide();
	$('#contact').hide();
	$('#aboutus').hide();
	$('#gallery').hide();
	$('#wp').hide();
	$('#testimonials').hide();
	$('.men').hide();
	$('#footer').hide();
	runEffect();
	var anchor = '#home';

    if (location.hash != '') {
        anchor = location.hash;
		showdiv(anchor);
	};
});

function runEffect(){
	$('#logo').show("slide",1000, function (){
		$('#logoBG').fadeIn(1000, function (){
			$('.men').show("slide",{ direction: "up" },500);
		});
	});
	setTimeout(function() {
	$('#content').fadeIn(1000, function(){
		$('#footer').fadeIn(600);
		return false;
		});
	}, 2500);
	
};

// to refresh the iFrames

function fhome() {
  iframe = document.getElementById('home');
  iframe.src = 'home.htm';
};
function fwp() {
  iframe = document.getElementById('wp');
  iframe.src = 'weddingplanner.htm';
};
function faboutus() {
  iframe = document.getElementById('aboutus');
  iframe.src = 'aboutus.htm';
};
function ftestimonials() {
  iframe = document.getElementById('testimonials');
  iframe.src = 'testimonials.htm';
};
function fcontact() {
  iframe = document.getElementById('contact');
  iframe.src = 'contact.asp';
};
function fgallery() {
  iframe = document.getElementById('gallery');
  iframe.src = 'gallery.htm';
};



function fbtnfirst() {
  iframe = document.getElementById('first');
  iframe.src = 'gallery_sofreh.htm';
};
function fbtnsecond() {
  iframe = document.getElementById('second');
  iframe.src = 'gallery_table.htm';
};
function fbtnthird() {
  iframe = document.getElementById('third');
  iframe.src = 'gallery_planner.htm';
};
// End

function showdiv(divID) {
	var D = $(divID);
	$('.frames').hide();
	D.fadeIn(1000);
};

// Loader 

$(document).ready(function(){
	showmainpage();
});

function showmainpage(){
	setTimeout(function(){
		$('#loader').fadeOut(500);
	}, 2000);
	
};

// Loader End

// Gallery Stuff

$(document).ready(function(){
	$("#second").hide();
	$("#third").hide();
	$("#btnfirst").animate({ backgroundColor: "#b3a363" }, "slow");
});

function showgallery(div) {
	var G = $(div);
	$('.gal').hide();
	G.fadeIn(500);
};

function movefirst(){
	 $("#arrow").animate({ "margin-top": 0 + "px" }, "slow");
	 $("#btnfirst").animate({ backgroundColor: "#b3a363" }, "slow");
	 $("#btnsecond").animate({ backgroundColor: "#e0d29f" }, "slow");
	 $("#btnthird").animate({ backgroundColor: "#e0d29f" }, "slow");
};
function movesecond(){
	 $("#arrow").animate({ "margin-top": 125 + "px" }, "slow");
	 $("#btnfirst").animate({ backgroundColor: "#e0d29f" }, "slow");
	 $("#btnsecond").animate({ backgroundColor: "#b3a363" }, "slow");
	 $("#btnthird").animate({ backgroundColor: "#e0d29f" }, "slow");
};
function movethird(){
	 $("#arrow").animate({ "margin-top": 250 + "px" }, "slow");
	 $("#btnfirst").animate({ backgroundColor: "#e0d29f" }, "slow");
	 $("#btnsecond").animate({ backgroundColor: "#e0d29f" }, "slow");
	 $("#btnthird").animate({ backgroundColor: "#b3a363" }, "slow");
};

// Gallery Stuff End
