function isiPhone(){
    return (
        (navigator.platform.indexOf("iPhone") != -1) ||
        (navigator.platform.indexOf("iPod") != -1)
    );
}

if(isiPhone()){
    $('#dragon').css('display','none');
}

$.fn.resize_dim = function() {
	width =$(window).width();
	height=$(window).height();
	
	$("#palissade").css("width",width);
	$("#palissade").css("height","600px");
	$("#footer").css("width",width);
	$("#panels").css("width",width*9);
	$("#dragon").css("top",(height+120)/2);
	
	
	var cont_height =$("#palissade").height();
	if (height >= 640){
		tutu=(height/2)-(cont_height/2);
		$("#palissade").css("padding-top",tutu);
	}else{
		$("#palissade").css("padding-top",'0');
	}
	
	
	if (width >= 1100){
		$("#dragon").css('width','450');
		$("#dragon").show();
	}else{
		if (width > 500){
			$("#dragon").css('width','300');
			$("#dragon").show();
		}
	}
	
	$("#banieres").show();
	
	$(".pali_block").css("width",width);
	$(".intro_block").css("width",width);			
	
	$.localScroll({
		target: '#palissade', // could be a selector or a jQuery object too.
		queue:true,
		duration:1500,
		hash:true,
		onBefore:function( e, anchor, $target ){

		},
		onAfter:function( anchor, settings ){

		}
	});
	
	$.localScroll.hash({
		target: '#palissade', // Could be a selector or a jQuery object too.
		queue:true,
		duration:1500
	});
}


$.fn.resize_it = function() {
	width =$(window).width();
	height=$(window).height();
	
	$("#palissade").css("width",width);
	$("#palissade").css("height","600px");
	$("#footer").css("width",width);
	$("#panels").css("width",width*9);
	$("#dragon").css("top",(height+120)/2);
	
	
	var cont_height =$("#palissade").height();
	if (height >= 640){
		tutu=(height/2)-(cont_height/2);
		$("#palissade").css("padding-top",tutu);
	}else{
		$("#palissade").css("padding-top",'0');
	}
	
	if (width >= 1100){
		$("#dragon").css('width','450');
	}else{
		$("#dragon").css('width','300');
	}
	
	$(".pali_block").css("width",width);
	$(".intro_block").css("width",width);
	
	$.localScroll({
		target: '#palissade', // could be a selector or a jQuery object too.
		queue:true,
		duration:1500,
		hash:true,
		onBefore:function( e, anchor, $target ){

		},
		onAfter:function( anchor, settings ){

		}
	});		
	
}
