$(document).ready(function(){
         $('#mode1').click(function(){
				$.ajax({
				  url: 'pages/setbg/circles.jpg',
				  success: function(data) {
			  
			  $('#patternImageLeft').css('background-image', 'url(images/patterns/circles.jpg)');
			  $('#patternImageRight').css('background-image', 'url(images/patterns/circles.jpg)');
			//	  $(window.location).attr('href', 'http://juliesingsjazz.com.previewdns.com/jazzapp/');
					  
				  //$('#bgImage').html='<td rowspan="3" valign="top" background="http://localhost/jazz/app/webroot/images/patterns/circles.jpg">&nbsp;</td>';
					  //$('#bgImage').css('background' , 'http://localhost/jazz/app/webroot/images/patterns/circles.jpg');
					  //document.getElementById('bgImage').style.backgroundImage = "http://localhost/jazz/app/webroot/images/patterns/circles.jpg";

				  }
				});
		 });
         $('#mode2').click(function(){
				$.ajax({
				  url: 'pages/setbg/flowers.jpg',
				  success: function(data) {
				  	
					$('#patternImageLeft').css('background-image', 'url(images/patterns/flowers.jpg)');
					$('#patternImageRight').css('background-image', 'url(images/patterns/flowers.jpg)');					
					
					//  $(window.location).attr('href', 'http://juliesingsjazz.com.previewdns.com/jazzapp/');					  
					  //$('#bgImage').html='<td rowspan="3" valign="top" background="http://localhost/jazz/app/webroot/images/patterns/flowers.jpg">&nbsp;</td>';
  					  //$('#bgImage').css('background' , 'http://localhost/jazz/app/webroot/images/patterns/flowers.jpg');
  					  //document.getElementById('bgImage1').style.backgroundImage = "http://localhost/jazz/app/webroot/images/patterns/flowers.jpg";
				  }
				});
		 });
         $('#mode3').click(function(){
				$.ajax({
				  url: 'pages/setbg/tapestry.jpg',
				  success: function(data) {
  					$('#patternImageLeft').css('background-image', 'url(images/patterns/tapestry.jpg)');
  					$('#patternImageRight').css('background-image', 'url(images/patterns/tapestry.jpg)');
					 // $(window.location).attr('href', 'http://juliesingsjazz.com.previewdns.com/jazzapp/');				  
				  }
				});
         });
         $('#mode4').click(function(){
				$.ajax({
				  url: 'pages/setbg/celtic.jpg',
				  success: function(data) {
   					$('#patternImageLeft').css('background-image', 'url(images/patterns/celtic.jpg)');
   					$('#patternImageRight').css('background-image', 'url(images/patterns/celtic.jpg)');
					 // $(window.location).attr('href', 'http://juliesingsjazz.com.previewdns.com/jazzapp/');
				  }
				});
         });
		 
         $('#home_page_call').click(function(){
 			$('#contactForm').hide();
 			$('#tweetBox').show();
			$("#contentPage").html('<img src="images/legs.jpg" width="584" height="584" alt="legs" />');
			return false;
         });

         $('a#about_us_call').click(function(){
											 
			$('#aboutImage').append('<img src="images/ajax-loader-small.gif" border="0" alt="wait" />');
			$("#contentPage").load("about", function(response, status, xhr) {
	
	//$("#about").attr("src","");
$('#aboutImage').html('<img src="images/about_on.png" width="187" height="20" border="0" alt="about" />');
$('#contactImage').html('<img src="images/contact.png" width="187" height="20" border="0" alt="contact" />');
$('#galleryImage').html('<img src="images/gallery.png" width="187" height="20" border="0" alt="gallery" />');
$('#eventImage').html('<img src="images/events.png" width="187" height="20" border="0" alt="event" />');
$('#musicImage').html('<img src="images/music.png" width="187" height="20" border="0" alt="music" />');
	
	
			}).fadeIn("slow");

			$('#contactForm').hide();
			$('#tweetBox').hide();

			return false;
         });
		 
		  $('a#contact_us_call').click(function(){

			$('#contactImage').append('<img src="images/ajax-loader-small.gif" border="0" alt="wait" />');
			$("#contentPage").load("contact", function(response, status, xhr) {
			
			$('#contactImage').html('<img src="images/contact_on.png" width="187" height="20" border="0" alt="contact" />');
$('#galleryImage').html('<img src="images/gallery.png" width="187" height="20" border="0" alt="gallery" />');
$('#aboutImage').html('<img src="images/about.png" width="187" height="20" border="0" alt="about" />');	
$('#eventImage').html('<img src="images/events.png" width="187" height="20" border="0" alt="event" />');
$('#musicImage').html('<img src="images/music.png" width="187" height="20" border="0" alt="music" />');
	
			$('#contactForm').show();
			$('#tweetBox').hide();
			

}).fadeIn("slow");
			return false;
         });

		  $('a#gallery_call').click(function(){

			$('#galleryImage').append('<img src="images/ajax-loader-small.gif" border="0" alt="wait" />');
			$("#contentPage").load("gallery", function(response, status, xhr) {
			
			$('#galleryImage').html('<img src="images/gallery_on.png" width="187" height="20" border="0" alt="gallery" />');

$('#aboutImage').html('<img src="images/about.png" width="187" height="20" border="0" alt="about" />');	
$('#contactImage').html('<img src="images/contact.png" width="187" height="20" border="0" alt="contact" />');
$('#eventImage').html('<img src="images/events.png" width="187" height="20" border="0" alt="event" />');
$('#musicImage').html('<img src="images/music.png" width="187" height="20" border="0" alt="music" />');

			$('#contactForm').hide();
			$('#tweetBox').hide();

}).fadeIn("slow");
			return false;
         });
		  
		  $('a#event_call').click(function(){

			$('#eventImage').append('<img src="images/ajax-loader-small.gif" border="0" alt="wait" />');
			$("#contentPage").load("event", function(response, status, xhr) {
			
			$('#eventImage').html('<img src="images/events_on.png" width="187" height="20" border="0" alt="event" />');
$('#aboutImage').html('<img src="images/about.png" width="187" height="20" border="0" alt="about" />');	
$('#contactImage').html('<img src="images/contact.png" width="187" height="20" border="0" alt="contact" />');
$('#galleryImage').html('<img src="images/gallery.png" width="187" height="20" border="0" alt="gallery" />');
$('#musicImage').html('<img src="images/music.png" width="187" height="20" border="0" alt="music" />');
			
			$('#contactForm').hide();
			$('#tweetBox').hide();

}).fadeIn("slow");
			return false;
         });
		  
		  $('a#music_call').click(function(){

			$('#musicImage').append('<img src="images/ajax-loader-small.gif" border="0" alt="wait" />');
			$("#contentPage").load("music", function(response, status, xhr) {
			
			$('#musicImage').html('<img src="images/music_on.png" width="187" height="20" border="0" alt="music" />');
			
$('#aboutImage').html('<img src="images/about.png" width="187" height="20" border="0" alt="about" />');	
$('#contactImage').html('<img src="images/contact.png" width="187" height="20" border="0" alt="contact" />');
$('#galleryImage').html('<img src="images/gallery.png" width="187" height="20" border="0" alt="gallery" />');
$('#eventImage').html('<img src="images/events.png" width="187" height="20" border="0" alt="event" />');
			
			$('#contactForm').hide();
			$('#tweetBox').hide();

}).fadeIn("slow");
			return false;
         });		  

});
