
jQ(document).ready(function() {
	/*
	* RW BLOG
	* 
	*/
	count_BlogPosts		= 0;
	precount_BlogPosts	= 0;
	page_Break			= 0;
	photoframeWidth		= 0;
	
	jQ('.blog-entry').each(function(){ 
		precount_BlogPosts = precount_BlogPosts+1;
	});
	if(jQ('.blog-entry').length) { pages_BlogPosts = 0; } else { pages_BlogPosts = -1; }
	
	if(TestNP == undefined ) {
		if(precount_BlogPosts == 1 ){ 
			//WENN NUR EIN ARTIKEL VORHANDEN IST	
			jQ(".blog-entry").css({display:"block", height:"auto", marginTop: "20px"});
			jQ(".blog-entry-body").css({display:"block"});	
		} else {
			//Normaler aufbau
			jQ('.blog-entry').each(function(){
				
				page_Break			= page_Break+1;
				count_BlogPosts		= count_BlogPosts+1;	
				jQ(this).addClass('blogPage'+pages_BlogPosts);
				
				if(page_Break == 13 || precount_BlogPosts == count_BlogPosts){ 
					page_Break = 0;
					var tempNumb = pages_BlogPosts+1;			
					jQ('.blogPage'+pages_BlogPosts).wrapAll('<div rel="myBlogPage" id="page'+tempNumb+'"></div>');
					pages_BlogPosts = pages_BlogPosts+1;
				}
					
			});
		}
	} else {
		jQ(".blog-entry").css({display:"block", height:"auto", marginTop: "20px"});
		jQ(".blog-entry-body").css({display:"block"});
	}
	
	
	//Set the title to blog page	
	if (jQ('meta[@name=myBlogNews]').length) {
		var BlogInfo2 = jQ('meta[@name=myBlogNews]').attr("content");
		jQ("#content").prepend('<h2 class="blogTitle">'+BlogInfo2+'</h2>');
	} 	
	jQ(".blog-next-page, .blog-archive-link").appendTo("#sidebar");
	
	if(TestNP === undefined ) {
	if(precount_BlogPosts == 1 ){ } else {
	
	//open the post entry with a animation
	if (jQ(".blog-entry-title").length) {
	jQ("#contentContainer").prepend('<div id="closeTrigger"></div>');
	jQ("#closeTrigger").hide();

	jQ(".blog-entry").each( function() {
		var BlogPostId = jQ(this).attr('id');
		
		jQ(".blog-entry-title a:first",this).removeAttr('href');
		jQ(".blog-entry-title",this).click( function(){

			var Headline = jQ(this).html();
			var InhaltPost = jQ('#'+BlogPostId+' .blog-entry-body').html();
		
			jQ("#closeTrigger").fadeIn("slow");
			jQ("#contentContainer").prepend('<div id="postDetails"></div>');
			jQ("#postDetails").css({display:"none"});
			jQ("#content, #pointNaviContent").fadeOut("fast");
			if(jQ(".blog-entry-body div[@rel=mypage]", this).length) {
				jQ(".blog-entry-body div[@rel=mypage]", this).clone().appendTo("#postDetails");
				jQ("#postDetails").prepend('<h1 class="Headline">'+Headline+'</h1>');
			} else {
				jQ("#postDetails").append('<h1 class="Headline">'+Headline+'</h1>'+InhaltPost);
			}
			jQ("#postDetails").fadeIn("normal");
		});
	});	
	}}
}
	// LIST HOVER
	jQ(".blog-entry").css("opacity", 0.7);
	jQ(".blog-entry").hover( function () {
		jQ(this).css("opacity", 1);}, function () {
		jQ(this).css("opacity", 0.7);
	});
	
	//CLOSE ENTRY
	jQ("#closeTrigger").click( function(){
		jQ("#content").fadeIn("normal");
		jQ(this).fadeOut("slow");
		jQ("#postDetails").fadeOut("fast");
		jQ("postDetails").remove();
	});		
	/***Tag Cloud*/
	jQ("ul.blog-tag-cloud").css("opacity", 0.7);
	jQ("ul.blog-tag-cloud").hover( function () {
		jQ(this).fadeTo("fast", 1);}, function () {
		jQ(this).fadeTo("fast", 0.7);
	});	
	
	/*ARCHIV*/
	jQ("#blog-archives br, #blog-categories br").remove();
	jQ("#blog-archives").append('<br class="clearer"/>');
	/*FIND THE STYLE*/
	var archivStyle		= jQ(".blog-archive-link-enabled").text();
	var searchM	= archivStyle.search(/^[A-Z]/);
	var searchY	= archivStyle.search(/^[0-9]{4,4}/);
	var searchD	= archivStyle.search(/^[0-9]{2,2}/);
	/*Monat*/
	if(searchY == -1 && searchM != -1 && searchD == -1) {
		jQ(".blog-archive-link-enabled, .blog-archive-link-disabled").css({ width: "65px", lineHeight:"1.5em", borderLeft: "1px solid #333", paddingLeft:"3px"});
		blogArchiveCut = 16;
	}
	
	/*Jahr*/
	if(searchY != -1 && searchM == -1 && searchD != -1) {
		jQ(".blog-archive-link-enabled, .blog-archive-link-disabled").css({ width: "40px",lineHeight:"1.5em",borderLeft: "1px solid #333", paddingLeft:"3px"});
		blogArchiveCut = 35;
	}
	/*Woche*/
	if(searchY == -1 && searchM == -1 && searchD != -1) {
		jQ(".blog-archive-link-enabled, .blog-archive-link-disabled").css({fontSize:"0.8em", width: "100px", lineHeight:"1.5em", borderLeft: "1px solid #333", paddingLeft:"2px"});
		blogArchiveCut = 18;
	}

	blogArchive			= 0;
	blogArchiveCount	= 0;
	blogArchivePage		= 0;
	blogArchiveCounter	= 0;
	
	jQ('.blog-archive-link-disabled').each(function(){
		blogArchive = blogArchive+1;
		jQ(this).addClass("blog-archive-part");
	});
	jQ('.blog-archive-link-enabled').each(function(){
		blogArchive = blogArchive+1;
		jQ(this).addClass("blog-archive-part");
	});
	
	jQ(".blog-archive-part").each(function(){
		blogArchiveCounter	= blogArchiveCounter+1;
		blogArchiveCount	= blogArchiveCount+1;
		jQ(this).addClass("blogArchivePage"+blogArchivePage);
		if(blogArchiveCount==blogArchiveCut) {
			jQ(".blogArchivePage"+blogArchivePage).wrapAll('<div rel="mysidebarPage"></div>');
			blogArchiveCount = 0;
			blogArchivePage = blogArchivePage+1;
		} else if (blogArchive == blogArchiveCounter) {
			jQ(".blogArchivePage"+blogArchivePage).wrapAll('<div rel="mysidebarPage"></div>');
		}
		
	});
	
	var preBlogCatCount = 0;
	jQ("#blog-categories a,#blog-categories div ").each(function(){
		preBlogCatCount = preBlogCatCount+1;
	});
	var BlogCatCount	= 0;
	var BlogCatCountAll	= 0;
	var BlogCatPage		= 0;
	jQ("#blog-categories a,#blog-categories div ").each(function(){
		BlogCatCount = BlogCatCount+1;
		BlogCatCountAll = BlogCatCountAll+1;		
		
		jQ(this).addClass("BlogCatPage"+BlogCatPage);
		if(BlogCatCount == 20 || preBlogCatCount == BlogCatCountAll ) {
			jQ(".BlogCatPage"+BlogCatPage).wrapAll('<div rel="mysidebarCatPage"></div>');
			BlogCatPage = BlogCatPage+1;
			BlogCatCount = 0;
		}
	});
});

jQ(document).ready(function() {
		
	/*
	* RW PHOTOALBUM
	* THUMBS PREVIEW AND IMAGELOAD
	*/
	countPhotoFrames = 0;
	jQ('.thumbnail-frame').each(function(){
		countPhotoFrames	= countPhotoFrames+1;
	});
	
	if(DeaktPhotoAlbum == 1) {
		countPhotoFrames = 0;
	}
	
	if(countPhotoFrames !==0) {
		maxPicture = 7;
		jQ("#content").css({width: "980px", padding: "0", left: "0", height:"550px"});
		jQ("#contentContainer").append('<div id="scrollable"></div>');
		jQ("#contentContainer").append('<div id="PhotoDesc"></div>');
		jQ("#PhotoDesc").append(jQ(".album-title, .album-description"));
		if(countPhotoFrames > 7) {
			jQ("#scrollable").append('<div class="advice"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Please move cursor to centre of page to display image in full<span/></div>'); 
			
			jQ("#scrollable").append('<a class="prev"></a> ');
		}
		
		jQ("#scrollable").append('<div class="items"></div>');
		
		if(countPhotoFrames > 7) {
			jQ("#scrollable").append('<a class="next"></a>');
		}
		
		jQ(".thumbnail-frame a").each(function(){
			jQ(this).appendTo("#scrollable .items");
		});
		
		jQ("#scrollable").css({zIndex:"99"});
		
		jQ(".album-wrapper").remove();
		if(countPhotoFrames > 7) { 
			jQ("#scrollable").scrollable({items:'.items',horizontal:true});
		}
		jQ("#scrollable").fadeTo("slow", 0.1);
		jQ("#scrollable").hover( function () {
			jQ(this).fadeTo("fast", 0.9);}, function () {
			jQ(this).fadeTo("slow", 0.0);
		});	
		var naviwidth =	jQ(".advice").width();
		var naviwidthE = 970-naviwidth;
		var naviwidthD = naviwidthE/2;
		
		jQ(".advice").css("margin-left",naviwidthD+"px" );
		jQ('#content').append('<div id="photoframe"></div>');
		jQ('#photoframe').css({textAlign: "center"});
		firstImagetoLoad = jQ("div.items:first a").attr('href');
		
		firstImagetoLoad = firstImagetoLoad.substr(0, firstImagetoLoad.length-4) + "jpg";
		/*LOAD FIRST PICTURE*/
		jQ('#contentContainer').prepend('<div id="preloader"><div id="spinner"></div>');
		jQ("#spinner").spinner({height: 48, width: 48, speed: 50});
		jQ('#content').slideUp('fast');
		var image = new Image();
		image.onload = function() {
			jQ("#photoframe").append('<img src="' + image.src + '" />', showFirstImage());
		};
						
		image.src = firstImagetoLoad;


		var toLoadInfo = jQ("div.items:first a").attr('href')+' .photo-caption';
		if (PhotoAlbumDescription != "yes") { 
			jQ(".album-description, .album-title").remove();
			jQ("#PhotoDesc").append('<div class="album-description"></div>');
		} 

		function loadPhotoCaption() {
			jQ('#photo-caption').load(toLoadInfo,'',showPhotoCaption())
		}
		
		function showPhotoCaption() {
			jQ('#photo-caption').show('normal');
		}	
					
		if (PhotoPhotoDescription == "yes") {
			jQ('.album-description').append('<div id="photo-caption"></div>');
			if (PhotoAlbumDescription == "yes") { 			
				jQ("#photo-caption").addClass("BorderPhotoTop");
			}
			jQ('#photo-caption').hide('fast', loadPhotoCaption);
		}
					
		
		/* OPEN PHOTO DIRE. REL*/
		jQ("div.items a").each(function(){
			var toLoadInfo = jQ(this).attr('href')+' .photo-caption';
			var photolinkE = jQ(this).attr('href');
			var photolink = photolinkE.substr(0, photolinkE.length-4) + "jpg";
			
			function loadPhotoCaptionPlus() {
				jQ('#photo-caption').load(toLoadInfo,'',showPhotoCaptionPlus())
			}
			function showPhotoCaptionPlus() {
				jQ('#photo-caption').show('normal');
			}
					
			jQ(this).attr('href', photolink);
			jQ(this).attr('href','#');
			jQ(this).css({ cursor: "pointer"});
			jQ(this).click( function () {
			
				if (PhotoPhotoDescription == "yes") {
					jQ('#photo-caption').hide('fast',loadPhotoCaptionPlus);

				}			
				
				jQ('#contentContainer').prepend('<div id="preloader"><div id="spinner"></div>');
				jQ("#spinner").spinner({height: 48, width: 48, speed: 50});
				jQ("#preloader").fadeIn('normal');
				if (PhotoAlbumAniSlide != -1) {
					jQ('#content').slideUp('fast',loadContent);
				}
				if (PhotoAlbumAniFade != -1) {
					jQ('#content').fadeOut('fast',loadContent);
				}
				if (PhotoAlbumAniSlide == -1 && PhotoAlbumAniFade == -1) {
					jQ('#content').hide('fast',loadContent);
				}								
				
				jQ('#content').append('<div id="photoframe"></div>');
				var toLoad = photolink;

				function loadContent() {
					jQ('#photoframe img').remove();
					var image = new Image();
					image.onload = function() {
						jQ("#photoframe").append('<img src="' + image.src + '" />',showNewContent());
					};					
					image.src = toLoad;				
				}
	
				function showNewContent() {
					if (PhotoAlbumAniSlide != -1) {
						jQ('#content').slideDown('normal', preloaderTot);
					}
					if (PhotoAlbumAniFade != -1) {
						jQ('#content').fadeIn('normal', preloaderTot);
					}
					if (PhotoAlbumAniSlide == -1 && PhotoAlbumAniFade == -1) {
						jQ('#content').show('normal', preloaderTot);
					}										
				}
				
				function preloaderTot() {
					jQ("#preloader").fadeOut('normal', killThefuckingPreloader);
				}
				function killThefuckingPreloader() {
					jQ("#preloader").remove();
				}
				
			});
		});	
		jQ("#sidebarContainer").css({opacity: "0.2"});
		jQ("#sidebarContainer").hover( function () {
			jQ(this).fadeTo("fast", 1);}, function () {
			jQ(this).fadeTo("fast", 0.2);
		});	
		
		jQ(".album-title").css({opacity: "0.2"});
		jQ(".album-description").css({opacity: "0.2"});

		if (PhotoAlbumDimmer != -1) {
			
			jQ("#scrollable").hover( function () {
				jQ(".album-title, .album-description").fadeTo("fast", 1);
				jQ("#photoframe").fadeTo("fast", 0.3);}, function () {
				jQ(".album-title").fadeTo("fast", 0.2);
				jQ(".album-description").fadeTo("fast", 0.2);
				jQ("#photoframe").fadeTo("fast", 1);
			});		
		} else {
			jQ("#PhotoDesc").hover( function () {
				jQ(".album-title, .album-description").fadeTo("fast", 1);}, function () {
				jQ(".album-title").fadeTo("fast", 0.2);
				jQ(".album-description").fadeTo("fast", 0.2);
			});	
		}
		
	}
});

jQ(document).ready(function() {
		
	/*
	* RW MOVIEALBUM
	* 
	*/
	countMovieFrames = 0;
	jQ('.movie-thumbnail-frame').each(function(){
		countMovieFrames	= countMovieFrames+1;
	});
	countCurrMovieFrames	= 0;
	countCurrMoviePages		= 0;
	countAllMoviesInAlbum	= 0;
	if(countMovieFrames !==0) {
		jQ(".movie-page-description, .movie-page-title").prependTo("#sidebar");
		jQ('.movie-thumbnail-frame').each(function(){
			countCurrMovieFrames	= countCurrMovieFrames+1;
			countAllMoviesInAlbum	= countAllMoviesInAlbum+1;
			jQ(this).addClass('moviePage'+countCurrMoviePages);
									
			if(countCurrMovieFrames==16){ 
				countCurrMovieFrames = 0;
				jQ('.movie-thumbnail-frame.moviePage'+countCurrMoviePages).wrapAll('<div rel="mypage"></div>');
				countCurrMoviePages = countCurrMoviePages+1;
			}
			if (countAllMoviesInAlbum == countMovieFrames) {
				jQ('.movie-thumbnail-frame.moviePage'+countCurrMoviePages).wrapAll('<div rel="mypage"></div>');
			}
		});
	}
	//LOADING MY BLIB TV
	if(MyBlibTV != 0) {
	jQ("#sidebarContainer").remove();
	jQ("#contentContainer").css({width:"980px", height:"550px", padding: "0"});
	jQ("#content").css({width:"970px", height:"540px", left: "5px", top: "5px", padding:"0", margin:"0"});
	
	var so = new SWFObject('http://fresh-me.blip.tv/scripts/flash/showplayer.swf?autostart=true&amp;backcolor=0x000000&amp;lightcolor=0xAAAAAA&amp;frontcolor=0x999999&amp;showplaylist=true&amp;enablejs=true&amp;showplayerpath=http://blip.tv/scripts/flash/showplayer.swf&amp;file=http://'+MyBlibTV+'/rss/flash/?referrer='+MyBlibTV, "mymovie", "970", "540", "6", "#ffffff");
	so.addParam("quality", "high");
	so.addParam("wmode", "transparent");
	so.addParam("showplayerpath", "http://blip.tv/scripts/flash/showplayer.swf");
	so.addParam("file","http://"+MyBlibTV+"/rss/flash/?referrer="+MyBlibTV);
	so.write("content");
	}
});

jQ(document).ready(function() {
		
	/*
	* Pay Loom
	* 
	*/
	if (TestNP == undefined) {
		countProductFrames = 0;
		jQ('#products .product').each(function(){
			countProductFrames	= countProductFrames+1;
		});
		countCurrSaleFrames		= 0;
		countCurrSalePages		= 0;
		countAllProducts		= 0;
		if(countProductFrames !==0) {
			jQ('#products .product').each(function(){
				countCurrSaleFrames		= countCurrSaleFrames+1;
				countAllProducts		= countAllProducts+1;
				jQ(this).addClass('salePage'+countCurrSalePages);
										
				if(countCurrSaleFrames== PayLoomProducts){ 
					countCurrSaleFrames = 0;
					jQ('#products .product.salePage'+countCurrSalePages).wrapAll('<div rel="mypage"></div>');
					countCurrSalePages = countCurrSalePages+1;
				}
				if (countAllProducts == countProductFrames) {
					jQ('#products .product.salePage'+countCurrSalePages).wrapAll('<div rel="mypage"></div>');
				}
			});
		}
	}
	
	
	/*
	* COLLAGE2
	*
	*/
	
	if (TestNP == undefined) {
	jQ('.collage-main').livequery( function(){
			countCollageFrames = 0;
			jQ('.collage-item').each(function(){
				countCollageFrames	= countCollageFrames+1;
			});
			
			countCurrCollageFrames		= 0;
			countCurrCollagePages		= 0;
			countAllCollagePictures		= 0;
			splitPagesforCollage2();
		});
		
		function splitPagesforCollage2() {
			jQ('.collage-item').each(function(){
				countCurrCollageFrames		= countCurrCollageFrames+1;
				countAllCollagePictures		= countAllCollagePictures+1;
				jQ(this).addClass('collagePage'+countCurrCollagePages);
									
				if(countCurrCollageFrames == CollageFrames){ 
					countCurrCollageFrames = 0;
					jQ('.collage-item.collagePage'+countCurrCollagePages).wrapAll('<div rel="mypage"></div>');
					countCurrCollagePages = countCurrCollagePages+1;
				}
				if (countAllCollagePictures == countCollageFrames) {
					jQ('.collage-item.collagePage'+countCurrCollagePages).wrapAll('<div rel="mypage"></div>');
				}
			});
		}
	}
});



jQ(document).ready(function() { 
	/*
	* FILESHARINGE ANIMATION
	* ITS THE HOVER
	*/
	countFileSharing = 0;
	jQ('.filesharing-item').each(function(){
		countFileSharing	= countFileSharing+1;
	});
	
	countCurrFileFiles		= 0;
	countCurrFilePages		= 0;
	countAllFilesInAlbum	= 0;
	
	if(countFileSharing > 8) {
		jQ('.filesharing-item').each(function(){

			countCurrFileFiles	= countCurrFileFiles+1;
			countAllFilesInAlbum	= countAllFilesInAlbum+1;
			jQ(this).addClass('filesPage'+countCurrFilePages);
									
			if(countCurrFileFiles==8){ 
				countCurrFileFiles = 0;
				jQ('.filesharing-item.filesPage'+countCurrFilePages).wrapAll('<div rel="mypage"></div>');
				countCurrFilePages = countCurrFilePages+1;
			}
			if (countAllFilesInAlbum == countFileSharing) {
				jQ('.filesharing-item.filesPage'+countCurrFilePages).wrapAll('<div rel="mypage"></div>');
			}
		});		
	}
	jQ(".filesharing-description").prependTo("#sidebar");			
});

/*FUNCTIONS*/
function showFirstImage() {
	jQ('#content').show('normal', fadeFirstLoader());
}
function fadeFirstLoader() {
	jQ("#preloader").fadeOut('normal', killFirstLoader);
}
function killFirstLoader() {
	jQ("#preloader").remove();
}
/*********************************/
/*NORMALE SEITE*******************/
jQ(document).ready(function() { 
	
	if(jQ('meta[@name=page]').length) {
	
		var normalPageWidth1	= jQ('meta[@name=page]').attr("content");
		var normalPageWidth2	= normalPageWidth1.split('/');
		var normalPageWidth		= normalPageWidth2[0];

		MySidebarIs =0;
		jQ('link[@rel=stylesheet]').each(function() {
			var Sidehref		= jQ(this).attr('href');
			SidebarPositionL	= Sidehref.search(/Sidebar_offLeft.+/);
			SidebarPositionR	= Sidehref.search(/Sidebar_off.+/);	
			SidebarPositionF	= Sidehref.search(/Sidebar_offFull.+/);
			if( SidebarPositionL != -1 || SidebarPositionR != -1 || SidebarPositionF != -1){	
				MySidebarIs = "off";
			}
		});
		if (MySidebarIs === 0) { 
			var normalPageWidth		= normalPageWidth2[0];
			var normalSidebar		= normalPageWidth2[1];
						
			if(normalSidebar !== undefined) {	
				var normalPageWidth		= (normalPageWidth*1)+(normalSidebar*1);
			} else { 
				var normalPageWidth		= normalPageWidth*1+200;
				var normalSidebar		= 200;
			}

		} else { 
			jQ("#sidebarContainer").remove();
			var normalPageWidth		= normalPageWidth2[0];
		}
		
		var normalPageWidthPad	= normalPageWidth*1+40;
		var TableWidth			= normalPageWidthPad*1+40;
		var MiddleTD			= TableWidth*1-80;		
		
		jQ('#header').css("display", "none");		
		jQ('#contentMover img').wrap('<div id="Sitelogo"></div>');
		jQ('#contentMover, #Sitelogo, #navcontainerTrigger').prependTo('body');
		
		
		/*CONTAINER CSS*/
		jQ('#navcontainerTrigger').css({ position:"fixed", top:"0", left:"0"});
		jQ('#contentMover').css({width: "100%", height: "100%", position: "fixed", top:"0", left:"0", textAlign: "left"});
		jQ('#Sitelogo').css({ textAlign:"right", width: normalPageWidthPad+"px", margin: "auto", marginTop: "20px" });
		
		jQ('body').append('<div id="normPageHolder"> \
			<div id="npTopLeft"></div><div id="npTopM" style="width:'+MiddleTD+'px"></div><div id="npTopRight"></div> \
			<div id="npLeft"><div id="npLeftT"></div><div id="npLeftM"></div><div id="npLeftB"></div></div> \
				<div id="npPage" style="width:'+normalPageWidthPad+'px"><br class="clearer"/></div> \
			<div id="npRight"><div id="npRightT"></div><div id="npRightM"></div><div id="npRightB"></div></div> \
			<div id="npBottom"><div id="npBottomLeft"></div><div id="npBottomM" style="width:'+MiddleTD+'px"></div><div id="npBottomRight"></div></div> \
		<br class="clearer"/></div>');
		
		jQ('#footer').appendTo('body');		
		jQ('#footer').css({paddingBottom:"20px"});
		
		jQ("#normPageHolder").css({ width: TableWidth+"px", margin: "auto"});		
		if (MySidebarIs === 0) {
			jQ('#contentContainer, #content').css({ position: "relative", height: "auto", width: normalPageWidth+"px", float:"none", margin: "0", padding: "0"});
			jQ('#sidebarContainer').css({ position: "relative", height: "auto", width: normalSidebar+"px", float:"left", margin: "0", padding: "0"});
			jQ('#content').css({ float:"left", width: normalPageWidth*1-normalSidebar+"px"});
			jQ('#sidebar').css({ position: "relative", height: "auto", width: "auto", float:"none", margin: "0", padding: "0", paddingRight: "20px"});
		} else {
			jQ('#contentContainer, #content').css({ position: "relative", height: "auto", width: normalPageWidth+"px", float:"none", margin: "0", padding: "0"});
		}
		jQ('#contentContainer').css({ padding:"20px"});
		
		/*ADD CONTENT*/	
		jQ("#npPage").css({ position: "relative"});
		
		jQ('#contentContainer').prependTo("#npPage");
		jQ('#pageholder').remove();
		
		/*DEFINE CSS*/
		var ContentHeightPage	= jQ("#content").height();
		var ContentBorderHeight	= ContentHeightPage*1;

		jQ("#npLeftM, #npRightM").css({height: ContentBorderHeight+"px"});
		jQ('#backslide').css({width: normalPageWidthPad+"px", height: ContentHeightPage*1+40+"px", position:"absolute"});
		
		var countCollage = 0;
		jQ('.collage-main').livequery( function(){
			jQ('#backslide').hide();
			countCollage = countCollage+1
			if(countCollage > 1) { jQ(this).addClass('delThis');} else { jQ(this).addClass('collage2Height');}
			jQ('.delThis').remove();
			if(splitUrl[0] == 'file:' ) {
				if (TestNP != undefined) { debug("DONT USE PAGE FOR COLLAGE2", "IT WILL GIVE AN ERROR IN IE6 & IE7");}
			}
		});
				
		jQ('#npPage').livequery( function(){
			var ContentHeightPage	= jQ("#contentContainer").height();
			var ContentBorderHeight	= ContentHeightPage*1;

			jQ("#npLeftM, #npRightM").css({height: ContentBorderHeight+"px"});
			jQ('#backslide').css({height: ContentHeightPage*1+40+"px", position: "absolute"});
			jQ('#backslide').fadeIn('normal');
		});
		if (jQ.browser.msie) {
		jQ.each(jQ.browser, function(i, val) {
			if(i=="msie" && jQ.browser.version.substr(0,3)<"7")
			jQ('#navcontainerTrigger').css({ position:"absolute", top:"0", left:"0"});
			jQ('#contentMover').css({width: "100%", height: "100%", position: "absolute", top:"0", left:"0", textAlign: "left"});
		});}			
	}
});


