// JavaScript Document


// home page + more info

$(document).ready(
	// Handler for content section
	function(){
		$('#home-content').hide();
		$('#more').toggle(
			function(){ $('#home-content').slideDown(); },
			function(){ $('#home-content').slideUp(); }
		);
	}
);

// img gallery pages

$(document).ready(function(){
	$(".gallery2").hide();
	$(".gallery3").hide();
	$(".gallery4").hide();
	$(".gallery5").hide();
	
	$(".page2").hide();
	$(".page3").hide();
	$(".page4").hide();
	
	$("#g1-c").click(
		function(){
			$('.gallery1').hide();
			$('.gallery2').fadeIn('slow');
			return false;
		}
	);
	
	$("#g2-b").click(
		function(){
			$('.gallery1').fadeIn('slow');
			$('.gallery2').hide();
			$('.gallery3').hide();
			return false;
		}
	);
	
	$("#g2-c").click(
		function(){
			$('.gallery1').hide();
			$('.gallery2').hide();
			$('.gallery3').fadeIn('slow');
			return false;
		}
	);	
	
	$("#g3-b").click(
		function(){
			$('.gallery2').fadeIn('slow');
			$('.gallery3').hide();
			$(".gallery4").hide();
			return false;
		}
	);	
	
	$("#g3-c").click(
		function(){
			$('.gallery2').hide();
			$('.gallery3').hide();
			$(".gallery4").fadeIn('slow');
			return false;
		}
	);
	
	$("#g4-b").click(
		function(){
			$('.gallery3').fadeIn('slow');
			$(".gallery4").hide();
			$(".gallery5").hide();
			return false;
		}
	);
	
	$("#g4-c").click(
		function(){
			$('.gallery3').hide();
			$(".gallery4").hide();
			$(".gallery5").fadeIn('slow');
			return false;
		}
	);
	
	$("#g5-b").click(
		function(){
			$(".gallery4").fadeIn('slow');
			$(".gallery5").hide();
			$(".gallery6").hide();
			return false;
		}
	);
	
// pages 
	$("#pg1-c").click(
			function(){
				$('.page1').hide();
				$(".page2").fadeIn('slow');
				return false;
			}
		);
	
	$("#pg2-b").click(
			function(){
				$('.page2').hide();
				$(".page1").fadeIn('slow');
				return false;
			}
		);

	$("#pg2-c").click(
			function(){
				$('.page2').hide();
				$(".page3").fadeIn('slow');
				return false;
			}
		);

	$("#pg3-b").click(
			function(){
				$('.page3').hide();
				$(".page2").fadeIn('slow');
				return false;
			}
		);

	$("#pg3-c").click(
			function(){
				$('.page3').hide();
				$(".page4").fadeIn('slow');
				return false;
			}
		);

	$("#pg4-b").click(
			function(){
				$('.page4').hide();
				$(".page3").fadeIn('slow');
				return false;
			}
		);

});


//flash

function Menu()
{
/*document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="154" height="420">\n');
document.write('<param name="wmode" value="transparent">');
//document.write('<param name="movie" value="/flash/menu.swf">\n');
document.write('<param name="movie" value="flash/menu.swf">\n');
document.write('<param name="quality" value="high">\n');
document.write('<embed src="flash/menu.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="154" height="420"  wmode="transparent"></embed>\n');
document.write('</object>\n');*/

document.write('<div style="background:url(/images/menu_bg.jpg) no-repeat center #252525;padding-top:1px"><ul class="nav"><li><a href="/index.html" title="Home">HOME</a></li>');
document.write('<li><a href="/about/" title="About Us">ABOUT US</a></li>');
document.write('<li><a href="/news/" title="News">NEWS</a></li>');
document.write('<li><a href="/shade-sails/" title="Shade Sails">SHADE SAILS</a></li>');
document.write('<li><a href="/structures/" title="Structures">STRUCTURES</a></li>');
document.write('<li><a href="/umbrellas/" title="Umbrellas">UMBRELLAS</a></li>');
document.write('<li><a href="/design/" title="Design">DESIGN</a></li>');
document.write('<li><a href="/fabric-swatches/" title="Fabric Swatches">FABRIC SWATCHES</a></li>');
document.write('<li><a href="/contact/" title="Contact">CONTACT</a></li>');
document.write('</ul></div>');

}

function Logo()
{
document.write('<img src="/images/logo.gif" alt="AllShade Solutions Gold Coast">');
document.write('<div align="right" style="margin-right:30px"><a href="/contact/" style="font-size:14px" title="Contact now for a free quote">CONTACT NOW FOR A FREE QUOTE</a></div><br/>');
/*document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="279" height="76">\n');
document.write('<param name="wmode" value="transparent">');
document.write('<param name="movie" value="/flash/logo.swf">\n');
document.write('<param name="quality" value="high">\n');
document.write('<embed src="/flash/logo.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="279" height="76"  wmode="transparent"></embed>\n');
document.write('</object>\n');*/
}

function Home()
{
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="700" height="420">\n');
document.write('<param name="wmode" value="transparent">');
//document.write('<param name="movie" value="/flash/home.swf">\n');
document.write('<param name="movie" value="/flash/home.swf">\n');
document.write('<param name="quality" value="high">\n');
document.write('<embed src="/flash/home.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="700" height="420"  wmode="transparent"></embed>\n');
document.write('</object>\n');
}

function Structures()
{
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="700" height="420">\n');
document.write('<param name="wmode" value="transparent">');
document.write('<param name="movie" value="/flash/structures.swf">\n');
document.write('<param name="quality" value="high">\n');
document.write('<embed src="/flash/structures.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="700" height="420"  wmode="transparent"></embed>\n');
document.write('</object>\n');
}

function Design()
{
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="700" height="420">\n');
document.write('<param name="wmode" value="transparent">');
document.write('<param name="movie" value="/flash/design.swf">\n');
document.write('<param name="quality" value="high">\n');
document.write('<embed src="/flash/design.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="700" height="420"  wmode="transparent"></embed>\n');
document.write('</object>\n');
}

function About()
{
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="700" height="420">\n');
document.write('<param name="wmode" value="transparent">');
document.write('<param name="movie" value="/flash/about.swf">\n');
document.write('<param name="quality" value="high">\n');
document.write('<embed src="/flash/about.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="700" height="420"  wmode="transparent"></embed>\n');
document.write('</object>\n');
}

function Shade()
{
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="700" height="420">\n');
document.write('<param name="wmode" value="transparent">');
document.write('<param name="movie" value="/flash/shade-sails.swf">\n');
document.write('<param name="quality" value="high">\n');
document.write('<embed src="/flash/shade-sails.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="700" height="420"  wmode="transparent"></embed>\n');
document.write('</object>\n');
}

function Umbrella()
{
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="700" height="420">\n');
document.write('<param name="wmode" value="transparent">');
document.write('<param name="movie" value="/flash/umbrella.swf">\n');
document.write('<param name="quality" value="high">\n');
document.write('<embed src="/flash/umbrella.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="700" height="420"  wmode="transparent"></embed>\n');
document.write('</object>\n');
}

function Contact()
{
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="700" height="420">\n');
document.write('<param name="wmode" value="transparent">');
document.write('<param name="movie" value="/flash/contact.swf">\n');
document.write('<param name="quality" value="high">\n');
document.write('<embed src="/flash/contact.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="700" height="420"  wmode="transparent"></embed>\n');
document.write('</object>\n');
}

function Privacy()
{
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="700" height="420">\n');
document.write('<param name="wmode" value="transparent">');
document.write('<param name="movie" value="/flash/privacy.swf">\n');
document.write('<param name="quality" value="high">\n');
document.write('<embed src="/flash/privacy.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="700" height="420"  wmode="transparent"></embed>\n');
document.write('</object>\n');
}

function SiteMap()
{
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="700" height="420">\n');
document.write('<param name="wmode" value="transparent">');
document.write('<param name="movie" value="/flash/sitemap.swf">\n');
document.write('<param name="quality" value="high">\n');
document.write('<embed src="/flash/sitemap.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="700" height="420"  wmode="transparent"></embed>\n');
document.write('</object>\n');
}

function Swatches()
{
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="700" height="420">\n');
document.write('<param name="wmode" value="transparent">');
document.write('<param name="movie" value="/flash/swatches.swf">\n');
document.write('<param name="quality" value="high">\n');
document.write('<embed src="/flash/swatches.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="700" height="420"  wmode="transparent"></embed>\n');
document.write('</object>\n');
}

// shaddow box

Shadowbox.loadSkin('classic', '../shaddowbox'); // use the "classic" skin
Shadowbox.loadPlayer(['flv', 'img', 'qt', 'swf'], '../shaddowbox/player');
window.onload = function(){
	Shadowbox.init();
}