$(document).ready(



	function(){

		
		
		var agent=navigator.userAgent.toLowerCase();
		var is_iphone = (agent.indexOf('iphone')!=-1);
		if (is_iphone) { 
		
			$('.item').click(function ()  {
			
				var num = $(this).attr('id').replace('item', '');
				
				if ($('#submenu'+num).length) {
					
					return false;
				
				} else {
	
					window.location = $(this).children('a').attr('href');
					return false;
				
				}
			
				
			});
		
		}
		

		/* prep rollovers */

		$('.submenu').hide();

		

		$('*').contents('div.item').each(function (i) {

		

			//console.log($(this).attr('id'));

		

			$(this).hover(function(){

				

				var submenu = $(this).attr('id').replace('item', 'submenu');

				

				if ($('#' + submenu).length) {

				

					$(this).addClass('itemOver');

					$('#' + submenu).show();

					$(this).append($('#' + submenu));

				}

				

			}, function(){

				

				var submenu = $(this).attr('id').replace('item', 'submenu');

				

				if ($('#' + submenu).length) {

					$(this).removeClass('itemOver');

					$('#' + submenu).hide();

				}

				

			});

		

		});

	

		if (!FlashDetect.installed) {

		

			$('.flashContainer').hide();

		

		} else {

			

			$('#menu').hide();

		

		}

		

		fixHeight();

	

	}

);



function fixHeight () {



	if ($('.mainLeft').length && $('.mainRight').length) {

			

			// console.log("Test.");

			

			var biggerHeight = Math.max($('.mainLeft').height(), $('.mainRight').height());

			if (biggerHeight < 1300) {

				$('.mainLeft').height(biggerHeight);

				$('.mainRight').height(biggerHeight);
				
			} else {
				
				if ($('.mainRight').height() < 1300) {
					$('.mainRight').height(1300);
				}
				
				if ($('.mainLeft').height() < 1300) {
					$('.mainLeft').height(1300);
				}
				
			}

			

		}



}



function thisMovie(movieName) {

    if (navigator.appName.indexOf("Microsoft") != -1) {

        return window[movieName]

    }

    else {

        return document[movieName]

    }

}

function JSF(url){

					alert("javascript: "+url);

				}

				

				

				
window.onload = fixHeight;
