﻿$(document).ready(function(){
	$("#showroom_homepage > a ").live('mouseout' , function(){
		$(this).css({'background-color': "#eeeeee", 'color':'#787878'});
	});

	$("#showroom_homepage > a ").live('mouseover' , function(){
		$(this).css({'background-color': '#0091bc',	'color':'#fff'});
	});

	var homepage = new ShowroomHomepage();
	homepage.init();
	homepage.showtime();

});





function ShowroomHomepage(){
	this.uri = '' + window.location + '';
	this.currentLanguage = 'en';
	this.currentModel = '';
	this.localHost = '';
	this.remoteHost = '';

	this.activeLinks = new Array;
	this.inactiveLinksCount = 0;
	this.language_pages = {
		'en-1' : '/en/',
		'en-2' : 'en.html',
		'fr-1' : '/fr/',		
		'fr-2' : 'fr.html'
	};

	this.dictionary = {
		'en' : '',
		'fr' : ''
	};	
	
	this.quick_links_titles = {
		'en' : 'Model Tools',
		'fr' : 'Plus sur les modèles'
	};
	
	this.arrow_images = {
		'en' : 'arrow.png',
		'fr' : 'arrow-fr.png'
	};


	this.showroom_homepage_left = 25;
	this.showroom_homepage_top = 300;	
	this.showroom_link_height = 30;
	
	
	
	
	
	
	
	
	
	
	
	// COMMON LINKS
	/********
	
	NOTE
	
	if you are going to be adding another common link
	- ie. a link that could be reused on every showroom - 
	you first need to define it below for both
	English et Fran?ais.
	
	
	If the link will always go to the same page regardless 
	of model, then you can define its link in this array
	(same goes for link text, if common defined here).
	
	If the link will have different properties, the item still 
	needs to be defined here, with at least a link_type and common
	
	Link Type value:
		remote
		local
		external
	
	The values for "remote" and "local" are defined in this.setHosts();
	
	The 'common' value defines where the link locaiton and text are
	stored. if common 1 it is in "quickLinksDictionary" if 0 it is
	stored in "modelQuickLinksList"
	
	
	
	For activation and model specific links... see next comment
	
	TRB June 2nd, 2011
	tbaxter@redurban.ca	
	
	***********/
	this.quickLinksDictionary = {
		'en' : {
			'test_drive' : {
				'title' : 'Book a Test Drive',
				'link' : '/testdrive/index.php?lang=en',
				'link_type' : 'remote',
				'common' : 1
			},
			'brochure' : {
				'title' : 'Download a Brochure',
				'link' : '/shopping_tools/request_a_brochure.html',
				'link_type' : 'local',
				'common' : 1
			},
			'news_reviews' : {
				'title' : 'News & Reviews',
				'link' : '/corporate/press_room.html',
				'link_type' : 'local',
				'common' : 1
			},
			'other_model' : {
				'link_type' : 'local',
				'common' : 0
			}
		},
		'fr' : {
			'test_drive' : {
				'title' : 'Réservez un essai routier',
				'link' : '/testdrive/index.php?lang=fr',
				'link_type' : 'remote',
				'common' : 1
			},
			'brochure' : {
				'title' : 'Téléchargez une brochure',
				'link' : '/outils_de_magasinage/brochures.html',
				'link_type' : 'local',
				'common' : 1
			},
			'news_reviews' : {
				'title' : 'Salle de presse',
				'link' : '/au_sujet_de_volkswagen/salle_de_presse.html',
				'link_type' : 'local',
				'common' : 1
			},
			'other_model' : {
				'link_type' : 'local',
				'common' : 0
			}
		}
	};
	
	
	// MODEL SPECIFIC CONFIGURATION
	/***********
	
	NOTE
	
	Below is how you turn on and off links for specific model 
	showroom homepages. 0 = off, 1 = on.
	
	Whenever a new link item is added to the common links, you 
	will need to set its state in the 'active_links'.
	
	This should only be for the model you want it available for,
	not every model... but if its break... do it for every model.
	
	
	
	In addition, if the link text and and link location will be
	different for each model, you can just use the same key as 
	you added to the active_link array and define its properties.
	
	See 'other_model' for an example
	
	
	TRB June 2nd, 2011
	tbaxter@redurban.ca	
	
	
	************/
	this.modelQuickLinksList = {
		'beetle_2012': {
			'active_links' : {'test_drive':1,'brochure':1,'news_reviews':1,'other_model':0},
			'other_model' : {
				'en' : {'title': '', 'link': ''}, 
				'fr' : {'title': '', 'link': ''}
			}
		},

		'cc_2012':  {
			'active_links' : {'test_drive':0,'brochure':0,'news_reviews':0,'other_model':0},
			'other_model' : {
				'en' : {'title': '2011 CC', 'link': '/models/cc_2011.html'}, 
				'fr' : {'title': 'CC 2011', 'link': '/models/cc_2011.html'}
			}
		},

		'cc_2011': {
			'active_links' : {'test_drive':1,'brochure':1,'news_reviews':1,'other_model':1},
			'other_model' : {
				'en' : {'title': '2012 CC', 'link': '/models/cc_2012.html'}, 
				'fr' : {'title': 'CC 2012', 'link': '/models/cc_2012.html'}
			}
		},

		'eos_2012': {
			'active_links' : {'test_drive':1,'brochure':1,'news_reviews':1,'other_model':0},
			'other_model' : {
				'en' : {'title': '2011 Eos', 'link': '/models/eos_2011.html'}, 
				'fr' : {'title': 'Eos 2011', 'link': '/models/eos_2011.html'}
			}
		},

		'eos_2011':  {
			'active_links' : {'test_drive':1,'brochure':1,'news_reviews':1,'other_model':1},
			'other_model' : {
				'en' : {'title': '2012 Eos', 'link': '/models/eos_2012.html'}, 
				'fr' : {'title': 'Eos 2012', 'link': '/models/eos_2012.html'}
			}
		},

		'golf_3door_2011': {
			'active_links' : {'test_drive':1,'brochure':1,'news_reviews':1,'other_model':0},
			'other_model' : {
				'en' : {'title': '', 'link': ''}, 
				'fr' : {'title': '', 'link': ''}
			}
		},

		'golf_3door_2012': {
			'active_links' : {'test_drive':1,'brochure':1,'news_reviews':1,'other_model':0},
			'other_model' : {
				'en' : {'title': '', 'link': ''}, 
				'fr' : {'title': '', 'link': ''}
			}
		},
		
		'golf_5door_2011': {
			'active_links' : {'test_drive':1,'brochure':1,'news_reviews':1,'other_model':0},
			'other_model' : {
				'en' : {'title': '', 'link': ''}, 
				'fr' : {'title': '', 'link': ''}
			}
		},
		
		'golf_5door_2012': {
			'active_links' : {'test_drive':1,'brochure':1,'news_reviews':1,'other_model':0},
			'other_model' : {
				'en' : {'title': '', 'link': ''}, 
				'fr' : {'title': '', 'link': ''}
			}
		},

		'jetta_gli_2012': {
			'active_links' : {'test_drive':1,'brochure':1,'news_reviews':1,'other_model':0},
			'other_model' : {
				'en' : {'title': '', 'link': ''}, 
				'fr' : {'title': '', 'link': ''}
			}
		},
        
		'golf_gti_2011':  {
			'active_links' : {'test_drive':1,'brochure':1,'news_reviews':1,'other_model':0},
			'other_model' : {
				'en' : {'title': '', 'link': ''}, 
				'fr' : {'title': '', 'link': ''}
			}
		},

		'golf_gti_2012': {
			'active_links' : {'test_drive':1,'brochure':1,'news_reviews':1,'other_model':0},
			'other_model' : {
				'en' : {'title': '', 'link': ''}, 
				'fr' : {'title': '', 'link': ''}
			}
		},
		
		'golf_wagon_2011':  {
			'active_links' : {'test_drive':1,'brochure':1,'news_reviews':1,'other_model':0},
			'other_model' : {
				'en' : {'title': '', 'link': ''}, 
				'fr' : {'title': '', 'link': ''}
			}
		},

		'golf_wagon_2012': {
			'active_links' : {'test_drive':1,'brochure':1,'news_reviews':1,'other_model':0},
			'other_model' : {
				'en' : {'title': '', 'link': ''}, 
				'fr' : {'title': '', 'link': ''}
			}
		},
		
		'jetta_2011': {
			'active_links' : {'test_drive':1,'brochure':1,'news_reviews':1,'other_model':0},
			'other_model' : {
				'en' : {'title': '', 'link': ''}, 
				'fr' : {'title': '', 'link': ''}
			}
		},

		'2012_jetta': {
			'active_links' : {'test_drive':1,'brochure':1,'news_reviews':1,'other_model':0},
			'other_model' : {
				'en' : {'title': '', 'link': ''}, 
				'fr' : {'title': '', 'link': ''}
			}
		},
		
		'passat_2012': {
			'active_links' : {'test_drive':1,'brochure':1,'news_reviews':1,'other_model':0},
			'other_model' : {
				'en' : {'title': '', 'link': ''}, 
				'fr' : {'title': '', 'link': ''}
			}
		},

		'routan_2011': {
			'active_links' : {'test_drive':1,'brochure':1,'news_reviews':1,'other_model':0},
			'other_model' : {
				'en' : {'title': '', 'link': ''}, 
				'fr' : {'title': '', 'link': ''}
			}
		},

		'routan_2012': {
			'active_links' : {'test_drive':1,'brochure':1,'news_reviews':1,'other_model':0},
			'other_model' : {
				'en' : {'title': '', 'link': ''}, 
				'fr' : {'title': '', 'link': ''}
			}
		},
		
		'tiguan_2011': {
			'active_links' : {'test_drive':1,'brochure':1,'news_reviews':1,'other_model':0},
			'other_model' : {
				'en' : {'title': '', 'link': ''}, 
				'fr' : {'title': '', 'link': ''}
			}
		},

		'tiguan_2012': {
			'active_links' : {'test_drive':1,'brochure':1,'news_reviews':1,'other_model':0},
			'other_model' : {
				'en' : {'title': '', 'link': ''}, 
				'fr' : {'title': '', 'link': ''}
			}
		},
		
		'touareg_2011': {
			'active_links' : {'test_drive':1,'brochure':1,'news_reviews':1,'other_model':0},
			'other_model' : {
				'en' : {'title': '', 'link': ''}, 
				'fr' : {'title': '', 'link': ''}
			}
		},
		
		'touareg_2012': {
			'active_links' : {'test_drive':1,'brochure':1,'news_reviews':1,'other_model':0},
			'other_model' : {
				'en' : {'title': '', 'link': ''}, 
				'fr' : {'title': '', 'link': ''}
			}
		},
		
		'tdi_clean_diesel' : {
			'active_links' : {'test_drive':0, 'brochure':0, 'news_reviews':0, 'other_model':0},
			'other_model' : {
				'en' : {'title': '', 'link': ''}, 
				'fr' : {'title': '', 'link': ''}
			}
		},
		
		'tdi_diesel_propre' : {
			'active_links' : {'test_drive':0, 'brochure':0, 'news_reviews':0, 'other_model':0},
			'other_model' : {
				'en' : {'title': '', 'link': ''}, 
				'fr' : {'title': '', 'link': ''}
			}
		}
	};
	
	
	
	
	
	
	
	
	
	
	
	
	
	
}

ShowroomHomepage.prototype = {
	'init' : function(){
		this.setLanguage();
		this.setHosts();
		this.setModel();
	},
	
	'setLanguage' : function(){
		for (var i in this.language_pages){
			if(this.uri.indexOf(this.language_pages[i]) != -1){
				this.currentLanguage = i.substring(0,2);
				break;
			}
		}
		
	},
	
	'setHosts' : function(){
		this.localHost = (this.currentLanguage == 'en') ? 'http://www.vw.ca/en' : 'http://www.vw.ca/fr';
		this.remoteHost = 'http://contents.vw.ca';
	},
	
	'setModel' : function(){
		for (var i in this.modelQuickLinksList){
			if(this.uri.indexOf(i) != -1){
				this.currentModel = i;
				break;
			}
		}
		
		if(this.uri.indexOf(this.currentLanguage+'.html') != -1){
			this.currentModel = 'siteHomePage';
		}
	},
	
	'setActiveLinks' : function(){
		this.activeLinks = this.modelQuickLinksList[this.currentModel]['active_links'];
	},
	
	
	'prepDictionary' : function(){
		for(var i in this.dictionary){
			this.dictionary[i] = new Array
			for(var j in this.activeLinks){
				this.dictionary[i][j] = new Array;
				
				if(this.quickLinksDictionary[this.currentLanguage][j]['common'] == 0){
					this.dictionary[i][j]['title'] = this.modelQuickLinksList[this.currentModel][j][i]['title'];
					this.dictionary[i][j]['link'] = this.modelQuickLinksList[this.currentModel][j][i]['link'];	
				}else{
					this.dictionary[i][j]['title'] = this.quickLinksDictionary[i][j]['title'];
					this.dictionary[i][j]['link'] = this.quickLinksDictionary[i][j]['link'];
				}
				this.dictionary[i][j]['link_type'] = this.quickLinksDictionary[i][j]['link_type'];
			}
		}
	},
	
	'buildQuickLinks' : function (){
		this.showroom_homepage_width = (this.currentLanguage == 'en') ? 140 : 175;
		this.setActiveLinks();
		this.prepDictionary();
		
		
		var quickLinks = '';
		var linkCount = 0;
		for(var i in this.activeLinks){
			if(this.activeLinks[i] == 0){
				this.inactiveLinksCount++;
			}else{
				var host_prefix = (this.dictionary[this.currentLanguage][i]['link_type'] == 'local') ? this.localHost : this.remoteHost+'/vw4';
				var targetWindow = '';
				if(this.dictionary[this.currentLanguage][i]['link_type'] == 'external'){
					host_prefix = '';
					targetWindow = ' target="'+i+'" ';
				}
				//edward
				this.modelNewsReviewsLinks = {
					'beetle_2012': {
							'en' : '/corporate/press-room---beetle.html', 
							'fr' : '/au_sujet_de_volkswagen/press-room---beetle.html'
					},
                    
					'golf_3door_2012': {
							'en' : '/corporate/press-room---golf-3dr.html', 
							'fr' : '/au_sujet_de_volkswagen/press-room---golf-3dr.html'
					},
					
					'cc_2012': {
							'en' : '', 
							'fr' : ''
					},
					
					'eos_2012': {
							'en' : '/corporate/press-room---eos.html', 
							'fr' : '/au_sujet_de_volkswagen/press-room---eos.html'
					},
					
					'golf_5door_2012': {
							'en' : '/corporate/press-room---golf-5dr.html', 
							'fr' : '/au_sujet_de_volkswagen/press-room---golf-5dr.html'
					},
					
					'jetta_gli_2012': {
							'en' : '/corporate/press-room---jetta-gli.html', 
							'fr' : '/au_sujet_de_volkswagen/press-room---jetta-gli.html'
					},
					
					'golf_gti_2012': {
							'en' : '/corporate/press-room---gti.html', 
							'fr' : '/au_sujet_de_volkswagen/press-room---gti.html'
					},
					
					'golf_wagon_2012': {
							'en' : '/corporate/press-room---golf-wagon.html', 
							'fr' : '/au_sujet_de_volkswagen/press-room---golf-wagon.html'
					},
					
					'2012_jetta': {
							'en' : '/corporate/press-room---jetta.html', 
							'fr' : '/au_sujet_de_volkswagen/press-room---jetta.html'
					},
					
					'passat_2012': {
							'en' : '/corporate/press-room---passat.html', 
							'fr' : '/au_sujet_de_volkswagen/press-room---passat.html'
					},
					
					'routan_2012': {
							'en' : '/corporate/press-room---routan.html', 
							'fr' : '/au_sujet_de_volkswagen/press-room---routan.html'
					},
					
					'tiguan_2012': {
							'en' : '/corporate/press-room---tiguan.html', 
							'fr' : '/au_sujet_de_volkswagen/press-room---tiguan.html'
					},
					
					'touareg_2012': {
							'en' : '/corporate/press-room---touareg.html', 
							'fr' : '/au_sujet_de_volkswagen/press-room---touareg.html'
					}
				};
				if((this.dictionary[this.currentLanguage][i]['title']=="News & Reviews" || this.dictionary[this.currentLanguage][i]['title']=="Salle de presse") && this.modelNewsReviewsLinks[this.currentModel][this.currentLanguage]!="")
				this.dictionary[this.currentLanguage][i]['link']=this.modelNewsReviewsLinks[this.currentModel][this.currentLanguage];
				//edward
				quickLinks += '<a href="'+host_prefix+this.dictionary[this.currentLanguage][i]['link']+'" '+targetWindow+' style="display:block; height:19px; padding-top:11px; padding-left:5px; background-color: #eeeeee; color:#787878; border-width:0px 0px 0px 0px; border-style:solid; border-color:#d3d3d3; text-decoration:none;	background-image:url(\''+this.remoteHost+'/vw4/images/'+this.arrow_images[this.currentLanguage]+'\');">'+this.dictionary[this.currentLanguage][i]['title']+'</a>';
				linkCount++;
			}
			
		}
		
		if(this.inactiveLinksCount != 0 ){
			this.showroom_homepage_top = this.showroom_homepage_top+(this.inactiveLinksCount*this.showroom_link_height)
		}
		var quickLinksContainer = '<div style="position:absolute; top:'+this.showroom_homepage_top+'px; left:'+this.showroom_homepage_left+'px; width:'+this.showroom_homepage_width+'px; background-color:#eeeeee; border-width:1px 0px 0px 1px; border-color: #dbdbdb; border-style:solid; padding:5px; font-size:11px; font-family:Helvetica, Arial, sans-serif;" id="showroom_homepage">';
			quickLinksContainer += '<div style="height:20px; padding-left:5px; padding-top:10px; background-repeat:repeat-x; background-color:#0091bc; font-size:11px; color:#fff; border-width:0 0 1px 0; border-style:solid; border-color:#d3d3d3;">'+this.quick_links_titles[this.currentLanguage]+'</div>';
			quickLinksContainer += quickLinks;
		quickLinksContainer += '</div>';
		
		if(linkCount != 0){
			$('#vwd4_content').append(quickLinksContainer);
		}
	},
	
	'showtime' : function(){
		switch(this.currentModel){
			case 'beetle_2012' : 
				/*
				var legalDictionary ={
					'en' : {
						'link' : 'Legal',
						'legal' : '<p style="width:725px; font-size:9px; font-family:Arial, Helvetica, sans-serif; margin-top:0;">*The 2012 Beetle 2.0T will have a delayed introduction.</p>'
					},
					'fr' : {
						'link' : 'Légal',
						'legal' : '<p style="width:725px; font-size:9px; font-family:Arial, Helvetica, sans-serif; margin-top:0;">*Le lancement de la Beetle 2.0T 2012 sera différé.</p>'
					}
				};
				
				var legalLink = '<a href="javascript:void(0)" onmouseover="javascript:$(\'div#beetle_legal\').fadeIn();" onmouseout="javascript:$(\'div#beetle_legal\').fadeOut();" style="display:block; color:#000; position:absolute; top:300px; left:25px; font-size:11px;">'+legalDictionary[currentLanguage]['link']+'</a>';
				var legalText = '<div id="beetle_legal" style="position:absolute; width:325px; top:260px; left:25px; display:none; font-size:9px; font-family:Arial, Helvetica, sans-serif; color:#000; padding:10px; background-image:url(\'http://contents.vw.ca/vw4/images/legal_background.png\');">'+legalDictionary[currentLanguage]['legal']+'</div>';
				$('#vwd4_content').append(legalLink);
				$('#vwd4_content').append(legalText);
				*/
				var iFrameSrc= (currentLanguage == 'en') ? '/driveuntil/4.0/model/2012Beetle/video-panel.html' :'/driveuntil/4.0/model/2012Beetle/video-panel-fr.html';
				var height = 450;
				$(".s3_stage").html('<iframe src="'+this.remoteHost+iFrameSrc+'" style="height:'+height+'px; width:960px" frameborder="0"></iframe>');
				$(".s3_stage").css({"height" : height+"px"});
				
				//this.buildQuickLinks();
				break;
			case 'cc_2012':
				var movieSrc = (currentLanguage == 'en') ? '/cc_buzzbox/2012cc_buzzbox.swf' : '/cc_buzzbox/2012cc_buzzbox_fr.swf';
				var nonflashimage = (currentLanguage == 'en') ? 'http://contents.vw.ca/vw4/images/CC_EN_2012.jpg' : 'http://contents.vw.ca/vw4/images/CC_FR_2012.jpg';
				$(".s3_stage").html('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="960" height="590" id="2012cc_buzzbox" align="middle">		<param name="movie" value="'+this.remoteHost+movieSrc+'" />		<param name="quality" value="high" />		<param name="bgcolor" value="#ffffff" />		<param name="play" value="true" />		<param name="loop" value="true" />		<param name="wmode" value="transparent" />		<param name="scale" value="showall" />		<param name="menu" value="true" />		<param name="devicefont" value="false" />		<param name="salign" value="" />		<param name="allowScriptAccess" value="sameDomain" />		<!--[if !IE]>-->		<object type="application/x-shockwave-flash" data="'+this.remoteHost+movieSrc+'" width="960" height="590">			<param name="movie" value="'+this.remoteHost+movieSrc+'" />			<param name="quality" value="high" />			<param name="bgcolor" value="#ffffff" />			<param name="play" value="true" />			<param name="loop" value="true" />			<param name="wmode" value="transparent" />			<param name="scale" value="showall" />			<param name="menu" value="true" />			<param name="devicefont" value="false" />			<param name="salign" value="" />			<param name="allowScriptAccess" value="sameDomain" />		<!--<![endif]-->			<a href="http://www.adobe.com/go/getflash">				<img src="'+nonflashimage+'" alt="Get Adobe Flash player" />			</a>		<!--[if !IE]>-->		</object>		<!--<![endif]--></object>');
				$(".s3_stage").css({"height" : "590px"});
				break;
			case 'cc_2011':
				this.buildQuickLinks();
				break;
			case 'eos_2012':
				this.buildQuickLinks();
				/*
				var movieSrc = (currentLanguage == 'en') ? '/eos_buzzbox/index.html' : '/eos_buzzbox/index_fr.html';
				$(".s3_stage").html('<iframe src="'+this.remoteHost+movieSrc+'" style="height:590px; width:960px" frameborder="0"></iframe>');
				$(".s3_stage").css({"height" : "590px"});
				*/
				break;
			case 'eos_2011':
				this.buildQuickLinks();
				break;
			case 'golf_3door_2011':
				//var iFrameSrc= (currentLanguage == 'en') ? '/driveuntil/4.0/model/driveUntil_buzzbox_4_model_en.html' :'/driveuntil/4.0/model/driveUntil_buzzbox_4_model_fr.html';
				var height = 450;
				var iFrameSrc= (currentLanguage == 'en') ? '/golf_buzzbox_08102011/index.php' :'/golf_buzzbox_08102011/index.php?lang=fr';
				$(".s3_stage").html('<iframe src="'+this.remoteHost+iFrameSrc+'" style="height:'+height+'px; width:960px" frameborder="0"></iframe>');
				$(".s3_stage").css({"height" : height+"px"});
				//this.buildQuickLinks();
				break;
			case 'golf_3door_2012':
				this.buildQuickLinks();
				break;	
			case 'golf_5door_2011':
				//var iFrameSrc= (currentLanguage == 'en') ? '/driveuntil/4.0/model/driveUntil_buzzbox_4_model_en.html' :'/driveuntil/4.0/model/driveUntil_buzzbox_4_model_fr.html';
				var height = 450;
				var iFrameSrc= (currentLanguage == 'en') ? '/golf_buzzbox_08102011/index.php' :'/golf_buzzbox_08102011/index.php?lang=fr';
				$(".s3_stage").html('<iframe src="'+this.remoteHost+iFrameSrc+'" style="height:'+height+'px; width:960px" frameborder="0"></iframe>');
				$(".s3_stage").css({"height" : height+"px"});
				//this.buildQuickLinks();
				break;
			case 'golf_5door_2012':
				this.buildQuickLinks();
				break;
			case 'jetta_gli_2012':
			    var iFrameSrc= (currentLanguage == 'en') ? '/driveuntil/4.0/model/2012GLI/video-panel.html' :'/driveuntil/4.0/model/2012GLI/video-panel-fr.html';
				var height = 450;
				$(".s3_stage").html('<iframe src="'+this.remoteHost+iFrameSrc+'" style="height:'+height+'px; width:960px" frameborder="0"></iframe>');
				$(".s3_stage").css({"height" : height+"px"});
				this.buildQuickLinks();
				break;	
		
			case 'golf_gti_2011':
				//var iFrameSrc= (currentLanguage == 'en') ? '/driveuntil/4.0/model/driveUntil_buzzbox_4_model_en.html' :'/driveuntil/4.0/model/driveUntil_buzzbox_4_model_fr.html';
				var height = 450;
				var iFrameSrc= (currentLanguage == 'en') ? '/golf_buzzbox_08102011/index.php' :'/golf_buzzbox_08102011/index.php?lang=fr';
				$(".s3_stage").html('<iframe src="'+this.remoteHost+iFrameSrc+'" style="height:'+height+'px; width:960px" frameborder="0"></iframe>');
				$(".s3_stage").css({"height" : height+"px"});
				//this.buildQuickLinks();
				break;
			case 'golf_gti_2012':
				this.buildQuickLinks();
				break;		
			case 'golf_wagon_2011':
				this.buildQuickLinks();
				break;
			case 'golf_wagon_2012':
				this.buildQuickLinks();
				break;	
			case 'jetta_2011':
				this.buildQuickLinks();
				break;
			case '2012_jetta':
				this.buildQuickLinks();
				break;	
			case 'passat_2012':
				
				//var iFrameSrc = (currentLanguage == 'en') ? '/vw4/passat-buzzbox/index.html' :'/vw4/passat-buzzbox/index_fr.html';
				//$(".s3_stage").html('<iframe src="'+this.remoteHost+iFrameSrc+'" style="height:489px; width:960px" frameborder="0"></iframe>');
				//$(".s3_stage").css({"height" : "489px"});
				
				//this.buildQuickLinks();
				break;
			case 'routan_2011':
				this.buildQuickLinks();
				break;
			case 'routan_2012':
				this.buildQuickLinks();
				break;		
			case 'tiguan_2011':
				this.buildQuickLinks();
				break;
			case 'tiguan_2012':
				this.buildQuickLinks();
				break;	
			case 'touareg_2011':
				this.buildQuickLinks();
				break;
			case 'touareg_2012':
				this.buildQuickLinks();
				break;	
			case 'tdi_clean_diesel':
				var quickLinksContainer = '<div style="position:absolute; top:265px; left:36px; width:141px; background-color:#eeeeee; border-width:1px 0px 0px 1px; border-color: #dbdbdb; border-style:solid; padding:5px; font-size:11px; font-family:Helvetica, Arial, sans-serif;" id="showroom_homepage">';
					quickLinksContainer += '<div style="background-color:#eeeeee; text-align:center; height:40px; padding-top:5px"><img src="'+this.remoteHost+'/tdi-clean-diesel/tdi_logo.png"></div>';
					quickLinksContainer += '<div style="height:20px; padding-left:5px; padding-top:10px; background-repeat:repeat-x; background-color:#0091bc; font-size:11px; color:#fff; border-width:0 0 1px 0; border-style:solid; border-color:#d3d3d3;">TDI Clean Diesel Models</div>';
					quickLinksContainer += '<a href="'+this.localHost+'/models/jetta_2011.html" style="display:block; height:15px; padding-top:6px; padding-left:5px; background-color: #eeeeee; color:#787878; border-width:0px 0px 0px 0px; border-style:solid; border-color:#d3d3d3; text-decoration:none; background-image:url(\''+this.remoteHost+'/vw4/images/arrow-small.png\');">Jetta</a>';
					quickLinksContainer += '<a href="'+this.localHost+'/models/golf_5door_2011.html" style="display:block; height:15px; padding-top:6px; padding-left:5px; background-color: #eeeeee; color:#787878; border-width:0px 0px 0px 0px; border-style:solid; border-color:#d3d3d3; text-decoration:none; background-image:url(\''+this.remoteHost+'/vw4/images/arrow-small.png\');">Golf</a>';
					quickLinksContainer += '<a href="'+this.localHost+'/models/passat_2012.html" style="display:block; height:15px; padding-top:6px; padding-left:5px; background-color: #eeeeee; color:#787878; border-width:0px 0px 0px 0px; border-style:solid; border-color:#d3d3d3; text-decoration:none; background-image:url(\''+this.remoteHost+'/vw4/images/arrow-small.png\');">Passat</a>';
					quickLinksContainer += '<a href="'+this.localHost+'/models/golf_wagon_2011.html" style="display:block; height:15px; padding-top:6px; padding-left:5px; background-color: #eeeeee; color:#787878; border-width:0px 0px 0px 0px; border-style:solid; border-color:#d3d3d3; text-decoration:none; background-image:url(\''+this.remoteHost+'/vw4/images/arrow-small.png\');">Golf Wagon</a>';
					quickLinksContainer += '<a href="'+this.localHost+'/models/touareg_2011.html" style="display:block; height:15px; padding-top:6px; padding-left:5px; background-color: #eeeeee; color:#787878; border-width:0px 0px 0px 0px; border-style:solid; border-color:#d3d3d3; text-decoration:none;	background-image:url(\''+this.remoteHost+'/vw4/images/arrow-small.png\');">Touareg</a>';
				quickLinksContainer += '</div>';
				$('#vwd4_content').append(quickLinksContainer);
				break;
			case 'tdi_diesel_propre':
			var quickLinksContainer = '<div style="position:absolute; top:265px; left:36px; width:155px; background-color:#eeeeee; border-width:1px 0px 0px 1px; border-color: #dbdbdb; border-style:solid; padding:5px; font-size:11px; font-family:Helvetica, Arial, sans-serif;" id="showroom_homepage">';
				quickLinksContainer += '<div style="background-color:#eeeeee; text-align:center; height:50px; padding-top:5px"><img src="'+this.remoteHost+'/tdi-clean-diesel/tdi_logo-fr.png"></div>';
				quickLinksContainer += '<div style="height:20px; padding-left:5px; padding-top:10px; background-repeat:repeat-x; background-color:#0091bc; font-size:11px; color:#fff; border-width:0 0 1px 0; border-style:solid; border-color:#d3d3d3;">Modèles TDI Diesel propres</div>';
				quickLinksContainer += '<a href="'+this.localHost+'/models/jetta_2011.html" style="display:block; height:15px; padding-top:6px; padding-left:5px; background-color: #eeeeee; color:#787878; border-width:0px 0px 0px 0px; border-style:solid; border-color:#d3d3d3; text-decoration:none; background-image:url(\''+this.remoteHost+'/vw4/images/arrow-small-fr.png\');">Jetta</a>';
				quickLinksContainer += '<a href="'+this.localHost+'/models/golf_5door_2011.html" style="display:block; height:15px; padding-top:6px; padding-left:5px; background-color: #eeeeee; color:#787878; border-width:0px 0px 0px 0px; border-style:solid; border-color:#d3d3d3; text-decoration:none; background-image:url(\''+this.remoteHost+'/vw4/images/arrow-small-fr.png\');">Golf</a>';
				quickLinksContainer += '<a href="'+this.localHost+'/models/passat_2012.html" style="display:block; height:15px; padding-top:6px; padding-left:5px; background-color: #eeeeee; color:#787878; border-width:0px 0px 0px 0px; border-style:solid; border-color:#d3d3d3; text-decoration:none; background-image:url(\''+this.remoteHost+'/vw4/images/arrow-small-fr.png\');">Passat</a>';
				quickLinksContainer += '<a href="'+this.localHost+'/models/golf_wagon_2011.html" style="display:block; height:15px; padding-top:6px; padding-left:5px; background-color: #eeeeee; color:#787878; border-width:0px 0px 0px 0px; border-style:solid; border-color:#d3d3d3; text-decoration:none; background-image:url(\''+this.remoteHost+'/vw4/images/arrow-small-fr.png\');">Golf familiale</a>';
				quickLinksContainer += '<a href="'+this.localHost+'/models/touareg_2011.html" style="display:block; height:15px; padding-top:6px; padding-left:5px; background-color: #eeeeee; color:#787878; border-width:0px 0px 0px 0px; border-style:solid; border-color:#d3d3d3; text-decoration:none;	background-image:url(\''+this.remoteHost+'/vw4/images/arrow-small-fr.png\');">Touareg</a>';
			quickLinksContainer += '</div>';
			$('#vwd4_content').append(quickLinksContainer);
			break;
				break;
			case 'siteHomePage':
				/*var movieSrc = (this.currentLanguage == 'en') ? '/driveuntil/4.0/home/driveUntil_buzzbox_4_home_en.html' : '/driveuntil/4.0/home/driveUntil_buzzbox_4_home_fr.html';
				$(".vwd4_m401").html('<iframe src="'+this.remoteHost+movieSrc+'" style="height:485px; width:960px; overflow:none;" frameborder="0" scrolling="no"></iframe>');
				$(".vwd4_m401").css({"height" : "485px"});*/
				var movieSrc = (this.currentLanguage == 'en') ? '/vw4/carousel/vw-carousel5.html' : '/vw4/carousel/vw-carousel5-fr.html';
				$(".vwd4_m401").html('<iframe src="'+this.remoteHost+movieSrc+'" style="height:485px; width:960px; overflow:none;" frameborder="0" scrolling="no"></iframe>');
				$(".vwd4_m401").css({"height" : "485px"});
				//var buttonSrc = (this.currentLanguage == 'en') ? this.remoteHost+'/tdi-clean-diesel/showroom_homepage_tdi_cube.jpg' : this.remoteHost+'/tdi-clean-diesel/showroom_homepage_tdi_cube-fr.jpg';
				//var linkSrc = (this.currentLanguage == 'en') ? this.localHost+'/models/tdi_clean_diesel.html' :  this.localHost+'/models/tdi_diesel_propre.html';
				//$('.vwd4_m401').append('<a href="'+linkSrc+'" style="top:398px; left:25px; display:block; position:absolute;"><img src="'+buttonSrc+'" border="0"></a>');
				break;
			
		}
	}
}
