$(document).ready(function () {
	
  
  var agent=navigator.userAgent.toLowerCase();
  var is_iphone = ((agent.indexOf('iphone') != -1));
  var is_ipad = ((agent.indexOf('ipad') != -1));

  if(is_iphone || is_ipad){
		$('#bleft').detach();
		$('#bright').detach();
		var foot = $('#foot').detach();
		$('#bfoot').detach();
		$('#content').append(foot);
		foot.css({
			'margin-top' : '90px'
		});
		
  } else {     
    var t = setTimeout("interface()",100);
		var t = setTimeout("interface()",1000);
		var t = setTimeout("interface()",2000);
		var t = setTimeout("interface()",3000);
		var t = setTimeout("interface()",4000);
		var t = setTimeout("interface()",5000);
	  interface();
	  $(window).resize(interface);
  };
 
});

function interface() {
	$('#bleft').width((($('body').width()-1000)/2)+240);
	$('#bright').width((($('body').width()-1000)/2)+240);
	$('#main').height($(document).height());
}

$(function(){
	$.superbox.settings = {
		boxId: "superbox", // Id attribute of the "superbox" element
		boxClasses: "", // Class of the "superbox" element
		overlayOpacity: .8, // Background opaqueness
		boxWidth: "600", // Default width of the box
		boxHeight: "400", // Default height of the box
		loadTxt: "Loading...", // Loading text
		closeTxt: "X", // "Close" button text
		prevTxt: "Previous", // "Previous" button text
		nextTxt: "Next" // "Next" button text
	};
	$.superbox();
});
