// = = = = = = = = = = = = = = = = = = = = = = =  = = = = = = = = = = = = = = = = = = = = = = =				
//colorbox
//Examples of how to assign the ColorBox event to elements
	$(document).ready(function(){
				//Examples of how to assign the ColorBox event to elements
				
				$(".single").colorbox();
				$(".colorbox").colorbox();
				
				
				
			});
				
// = = = = = = = = = = = = = = = = = = = = = = =  = = = = = = = = = = = = = = = = = = = = = = =

// Google Map
function initialize() {
				var latlng = new google.maps.LatLng(50.9995199,4.1285531);
				var settings = {
					zoom: 16,
					center: latlng,
					mapTypeControl: true,
					mapTypeControlOptions: {style: google.maps.MapTypeControlStyle.DROPDOWN_MENU},
					navigationControl: true,
					navigationControlOptions: {style: google.maps.NavigationControlStyle.SMALL},
					mapTypeId: google.maps.MapTypeId.ROADMAP};
				var map = new google.maps.Map(document.getElementById("map_canvas"), settings);
				var contentString = '<div id="contentMap">'+
					'<div id="siteNotice">'+
					'</div>'+
					'<h4 id="firstHeading" class="firstHeading">Moortgat Juweliers</h4>'+
					'<div id="bodyContent">'+
					'<p>Open:<br />'+
					'Dinsdag-vrijdag 9-12u en 13-19u<br />'+
				'Zaterdag 9-18u doorlopend <br />'+
				'Zondag, maandag: Gesloten.</p>'+
				
					'</div>'+
					'</div>';
				var infowindow = new google.maps.InfoWindow({
					content: contentString
				});
				
				var companyImage = new google.maps.MarkerImage('i/logoGoogleMap.png',
					new google.maps.Size(100,50),
					new google.maps.Point(0,0),
					new google.maps.Point(50,50)
				);

				var companyShadow = new google.maps.MarkerImage('i/logoGoogleMap_shadow.png',
					new google.maps.Size(130,50),
					new google.maps.Point(0,0),
					new google.maps.Point(65, 50));

				var companyPos = new google.maps.LatLng(50.9995199,4.1285531);

				var companyMarker = new google.maps.Marker({
					position: companyPos,
					map: map,
					icon: companyImage,
					shadow: companyShadow,
					title:"Moortgat Juweliers",
					zIndex: 3});
					google.maps.event.addListener(companyMarker, 'click', function() {
					infowindow.open(map,companyMarker);
				});
			}
// = = = = = = = = = = = = = = = = = = = = = = =  = = = = = = = = = = = = = = = = = = = = = = =
// topnav
$(document).ready(function() {
	$("#topnav li").prepend("<span></span>"); //Throws an empty span tag right before the a tag
	
	$("#topnav li").each(function() { //For each list item...
		var linkText = $(this).find("a").html(); //Find the text inside of the a tag
		$(this).find("span").show().html(linkText); //Add the text in the span tag
	}); 

	var pageID = $("body").attr("id");// Get Page ID
	
	$("#topnav li").hover(function() {	//On hover...\
		var navClass = $(this).attr("class");	//Get current list class name	
		if (pageID != navClass) { //If page ID is not the same as hovered list class name...
			$(this).find("span").stop().animate({ 
				marginTop: "-40" //Find the span tag and move it up 40 pixels
			}, 250);
		}
	} , function() { //On hover out...
		var navClass = $(this).attr("class");	//Get current list class name	
		if (pageID != navClass) { //If page ID is not the same as hovered list class name...
			$(this).find("span").stop().animate({
				marginTop: "0" //Move the span back to its original state (0px)
			}, 250);
		}
		
	});
	
});
// = = = = = = = = = = = = = = = = = = = = = = =  = = = = = = = = = = = = = = = = = = = = = = =
//slider
stepcarousel.setup({
				galleryid: 'slider', //id of carousel DIV
				beltclass: 'belt', //class of inner "belt" DIV containing all the panel DIVs
				panelclass: 'panel', //class of panel DIVs each holding content
				autostep: {enable:true, moveby:1, pause:9000},
				panelbehavior: {speed:500, wraparound:false, persist:true},
				defaultbuttons: {enable: false, moveby: 1, leftnav: ['', 450, 282], rightnav: ['', -35, 282]},
				statusvars: ['statusA', 'statusB', 'statusC'], //register 3 variables that contain current panel (start), current panel (last), and total panels
				onslide:function(){ select_icon(statusA); },
				contenttype: ['inline'] //content setting ['inline'] or ['external', 'path_to_external_file']
				})
				function select_icon(q){					
					for(i=1;i<5 ;i++)
					{
					  if(i==q)
					  {
					  	$("#service_" + i).removeClass("sliderItem");
						$("#service_" + i).addClass("sliderItemOn");
						if(i=="1"){
							$("#service_" + i).addClass("sliderItemOnFirst");
						}
						
					  }
					  else
					  {
					  	if(i=="1"){
							$("#service_" + i).removeClass("sliderItemOnFirst");
						}
					  	$("#service_" + i).removeClass("sliderItemOn");
						$('#service_'+i).addClass("sliderItem");
						
					  }
					}
				}


// = = = = = = = = = = = = = = = = = = = = = = =  = = = = = = = = = = = = = = = = = = = = = = =	
// open external links in blank window/tab
$(document).ready(function()
{
       //Check all links on page
       $('a')
       .filter(function()
       {
               //abort if we're dealing with an internal link
               return this.hostname && this.hostname !== location.hostname;

       })
       //add class
       .addClass("external")
       //append text
       //.append(" (external)")
       //open in new window and add title
       .attr({target: "_blank",title: "Opent in een nieuw venster of tab"});
	   //door mij toegevoegd om geen icoontje te hebben bij de img
$ ('.add a, .item table a').removeClass("external"); //Remove any "external" class
$ ('#style_switcher a').removeClass("external"); //Remove any "external" class
});			