// JavaScript Document
// Built based on Jquery Frameworks
// by Wyemun
// wyemun@wyemun.com
// www.wyemun.com
//======================================//

//============Check Resolution=========================//
var screenRatio = screen.width / screen.height;
var bg1 = "";
var bg2 = "";
var bg3 = "";
var bg4 = "";
var bg5 = "";

if(screenRatio < (1.469))
{
	bg1 = "images/bg01-3.2.jpg";
	bg2 = "images/bg02-3.2.jpg";
	bg3 = "images/bg03-3.2.jpg";
	bg4 = "images/bg04-3.2.jpg";
	bg5 = "images/bg05-3.2.jpg";
}
else
{
	bg1 = "images/bg01-4.3.jpg";
	bg2 = "images/bg02-4.3.jpg";
	bg3 = "images/bg03-4.3.jpg";
	bg4 = "images/bg04-4.3.jpg";
	bg5 = "images/bg05-4.3.jpg";
};
	


//============CONTENT TEXTS=========================//
var textPage1 = "<p>We have come across videographers with good portfolio and reasonably cheap package for the level of standard portrayed. However things just don\'t turn out the way you want it after engaging them to cover the major event of your life.  And this is what we went through during our own wedding preparation for a \"Save-the-Date\" video. We have been there and done that; and it\'s for a sure an experience that you wouldn\'t want to go through for such a happy occasion.</p><p>So, here we are to give you the assurance that any unhappiness will be minimised to the least and satisfactory level will be maximised for your wedding video experience with jrvisual.</p><p>We look forward to sharing more with you our experience of going through the videographer selection phase and helping you to remember the happy moments the way you want it \'cos its your wedding.</p>";

var textPage2 = "<p><span class='listTitle'>&nbsp;Photo Montage&nbsp;</span><br /><span class='listText'>A story-telling video of growing up photos that will bring about laughter and beautiful memories (approximately 3-5 minutes)</span></p><p><span class='listTitle'>&nbsp;Save-the-Date Video&nbsp;</span><br /><span class='listText'>A short video teaser that can be shared online with family and friends to remind them of your big day (approximately 1-2 minute)</span><p><span class='listTitle'>&nbsp;Express Highlight Video&nbsp;</span><br /><span class='listText'>The funniest and naughtiest acts before getting to the bride (approximately 5 minutes)</span></p><p><span class='listTitle'>&nbsp;Actual Day Video&nbsp;</span><br /><span class='listText'>The recording from the beginning till the end of your big day (10 hours)</span></p><p><span class='listText'>Every wedding couple has their unique story to share, contact us for the best way we can help to spread your love story around.</span></p>"

var textPage3 = "<iframe scrolling='no' src='portfolio.html' width='100%' height='93%' frameborder='0' allowtransparency='true'></iframe>";

var textPage4 = "<iframe scrolling='no' src='http://www.jrvisual.com/frog/?articles.html' width='100%' height='93%' frameborder='0' allowtransparency='true'></iframe>";

var textPage5 = "<iframe scrolling='auto' src='contactform.html' width='100%' height='95%' frameborder='0' allowtransparency='true'></iframe>";

var textTemp = "<p> Under Construction </p>";

function pageChecker(page){
	switch(page)
	{
		case 1:
			$("#contentText").hide().delay(1000, function(){
				$("#contentText").html(textPage1).fadeIn(500); });
			$("#contentBox").stop().animateToClass("contentBox1", 1000).removeClass();
			$("#contentTitle img").attr({src : "images/titles/title1.png"});
			$("#bg img").delay(1000, function(){
				$("#bg img").fadeOut(200).delay(200, function(){
					$("#bg img").attr({src : bg1}).fadeIn(500); }); });
			$("#webLogo").stop().removeClass().addClass("logoWhite");
			break;
			
		case 2:
			$("#contentText").hide().delay(1000, function(){
					$("#contentText").html(textPage2).fadeIn(500); });
			$("#contentBox").stop().animateToClass("contentBox2", 1000).removeClass();
			$("#contentTitle img").attr({src : "images/titles/title2.png"});
			$("#bg img").delay(1000, function(){
				$("#bg img").fadeOut(200).delay(200, function(){
					$("#bg img").attr({src : bg2}).fadeIn(500); }); });
			$("#webLogo").stop().removeClass().addClass("logoWhite");
			break;
		
		case 3:
			$("#contentText").hide().delay(1000, function(){
					$("#contentText").html(textPage3).fadeIn(500); });
			$("#contentBox").stop().animateToClass("contentBox3", 1000).removeClass();
			$("#contentTitle img").attr({src : "images/titles/title3.png"});
			$("#bg img").delay(1000, function(){
				$("#bg img").fadeOut(200).delay(200, function(){
					$("#bg img").attr({src : bg3}).fadeIn(500); }); });
			$("#webLogo").stop().removeClass().addClass("logoWhite");
			break;
			
		case 4:
			$("#contentText").hide().delay(1000, function(){
					$("#contentText").html(textPage4).fadeIn(500); });
			$("#contentBox").stop().animateToClass("contentBox4", 1000).removeClass();
			$("#contentTitle img").attr({src : "images/titles/title4.png"});
			$("#bg img").delay(1000, function(){
				$("#bg img").fadeOut(200).delay(200, function(){
					$("#bg img").attr({src : bg4}).fadeIn(500); }); });
			$("#webLogo").stop().removeClass().addClass("logoWhite");
			break;
			
		case 5:
			$("#contentText").hide().delay(1000, function(){
					$("#contentText").html(textPage5).fadeIn(500); });
			$("#contentBox").stop().animateToClass("contentBox5", 1000).removeClass();
			$("#contentTitle img").attr({src : "images/titles/title5.png"});
			$("#bg img").delay(1000, function(){
				$("#bg img").fadeOut(200).delay(200, function(){
					$("#bg img").attr({src : bg5}).fadeIn(500); }); });
			$("#webLogo").stop().removeClass().addClass("logoWhite");
			break;
	}
};
	
