// JavaScript Document

$(document).ready(function(){
	var blackpreviewInnerDiv2 = '<img src="http://www.creatimage.net/images/createmoreimage_black.jpg" alt="CREATE MORE IMAGE" class="previewImage" />';
	var blackpreviewInnerDiv = '<div class="blackpreview"><img src="http://www.creatimage.net/images/createmoreimage_black.jpg" alt="CREATE MORE IMAGE" /></div>';
	var blackpreviewInner = '<img src="http://www.creatimage.net/images/createmoreimage_black.jpg" alt="CREATE MORE IMAGE" class="previewImage" />';
	var previewInner = '<img src="http://www.creatimage.net/images/createmoreimage_transparent.png" alt="CREATE MORE IMAGE" class="previewImage" />'+$('#creatimagepreview').html();
	var marginLeft = (($(window).width()-960)/2)+'px';
	var screenwidth = $(window).width()+'px';
	var screenheight = $(document).height()+'px';	$('#creatimagepreview').hide().css({'position': 'relative', 'z-index': 11});
	$('body').append('<div id="blackpreviewdiv2" /><div id="blackpreviewdiv" /><div id="blackpreview" /><div class="whitepreview"/><div id="preview" />');
	$('#blackpreviewdiv2').css({'background': 'white', 'width': screenwidth, 'height': screenheight, 'position': 'fixed', 'top': 0, 'left': 0, 'z-index': '7'}).append(blackpreviewInnerDiv2);
	$('#blackpreviewdiv').css({'background': 'white', 'width': screenwidth, 'height': screenheight, 'position': 'fixed', 'top': 0, 'left': 0, 'z-index': '8'}).append(blackpreviewInnerDiv);
	$('#blackpreview').css({'background': 'black', 'width': screenwidth, 'height': screenheight, 'position': 'fixed', 'top': 0, 'left': 0, 'z-index': '9'}).append(blackpreviewInner);
	$('#preview').css({'background': 'white', 'width': screenwidth, 'height': screenheight, 'position': 'absolute', 'top': 0, 'left': 0, 'z-index': '10'}).append(previewInner);
	$('.blackpreview').css({'position': 'absolute', 'top': '194px', 'left': 0, 'width': screenwidth, 'text-align': 'center', 'background': 'black'});	$('.whitepreview').css({'background': 'white', 'width': screenwidth, 'height': screenheight, 'position': 'fixed', 'top': 0, 'left': 0, 'z-index': '10'});	$('.previewImage').css({'position': 'absolute', 'top': '194px', 'left': marginLeft});
	$('.creatimagebrands').css({'position': 'relative', 'top': '594px', 'left': marginLeft, 'text-align': 'center', 'width': '960px', 'z-index': 11});
	$('.brandko-rup').parents('.creatimagesubbrand').children('span').css({'left': '141px', 'width': '87px'});
	$('.brandpackshot').parents('.creatimagesubbrand').children('span').css({'left': '173px', 'width': '84px'});
	$('.brandpropprops').parents('.creatimagesubbrand').children('span').css({'left': '185px', 'width': '106px'});
	$('.brandlogstock').parents('.creatimagesubbrand').children('span').css({'left': '175px', 'width': '240px'});
	$('.branddai-ka').parents('.creatimagesubbrand').children('span').css({'left': '135px', 'width': '138px'});
	$('.brandglomglom').parents('.creatimagesubbrand').children('span').css({'left': '184px', 'width': '180px'});
	$('.brandmaxspeedhost').parents('.creatimagesubbrand').children('span').css({'left': '210px', 'width': '184px'});
	
	$('.brandpropprops').click(returnfalse);

$('.creatimagemenu ul').hide().css({'z-index': 10000});
	$('.creatimagemenu').hover(function(){
		$(this).children('ul').fadeIn('slow');
	}, function(){
		$(this).children('ul').fadeOut('fast');
	});
		
	$('.creatimagesubbrand span').hide().css({'position': 'absolute'});
	$('.creatimagesubbrand a').hover(function(){
		$(this).parents('.creatimagesubbrand').children('span').fadeIn('slow');
	}, function(){
		$(this).parents('.creatimagesubbrand').children('span').fadeOut('fast');
	});
	$('.EnterSite').click(EnterSite);

});

function EnterSite(){
	$('#preview').delay(500).fadeOut(1000, function(){		$('#blackpreview').delay(1000).fadeOut(2000,  function(){
			$('#blackpreviewdiv').fadeOut(2000,  function(){
				$('#blackpreviewdiv2').fadeOut(2000, function(){
					$.get('../plugins/entersite.asp');
				});
			});
		});	});		$('.whitepreview').fadeOut(1000);
	return false;
}

function returnfalse(){
	return false;
}$(window).resize(function(){	var screenwidth = $(window).width()+'px';	var screenheight = $(document).height()+'px';	var marginLeft = (($(window).width()-960)/2)+'px';	$('#blackpreviewdiv2').css({'width': screenwidth, 'height': screenheight});	$('#blackpreviewdiv').css({'width': screenwidth, 'height': screenheight});	$('#blackpreview').css({'width': screenwidth, 'height': screenheight});	$('#preview').css({'width': screenwidth, 'height': screenheight});	$('.blackpreview').css({'width': screenwidth});	$('.whitepreview').css({'width': screenwidth, 'height': screenheight});	$('.previewImage').css({'left': marginLeft});	$('.creatimagebrands').css({'left': marginLeft});});
