//Flickr Widget in Footer			
$(document).ready(function(){		 			   
	// Our very special jQuery JSON fucntion call to Flickr, gets details of the most recent images			   
	$.getJSON("http://api.flickr.com/services/feeds/photos_public.gne?id=52617155@N08&lang=en-us&format=json&jsoncallback=?", displayImages);  //YOUR IDGETTR GOES HERE
	function displayImages(data) {																																   
		// Randomly choose where to start. A random number between 0 and the number of photos we grabbed (20) minus  7 (we are displaying 7 photos).
		var iStart = Math.floor(Math.random()*(0));	
		
		// Reset our counter to 0
		var iCount = 1;								
		
		// Start putting together the HTML string
		var htmlString = "<ul>";					
		
		// Now start cycling through our array of Flickr photo details
		$.each(data.items, function(i,item){
									
			// Let's only display 6 photos (a 2x3 grid), starting from a the first point in the feed				
			if (iCount > iStart && iCount < (iStart + 10)) {
				
				// I only want the ickle square thumbnails
				var sourceSquare = (item.media.m).replace("_m.jpg", "_s.jpg");		
				
				// Here's where we piece together the HTML
				htmlString += '<li><a href="' + item.link + '" target="_blank">';
				htmlString += '<img src="' + sourceSquare + '" alt="' + item.title + '" title="' + item.title + '"/>';
				htmlString += '</a></li>';
			}
			// Increase our counter by 1
			iCount++;
		});		
		
	// Pop our HTML in the #images DIV	
	$('#flickrfooter').html(htmlString + "</ul>");
	
	// Close down the JSON function call
	}
	
// The end of our jQuery function	
});


//Flickr Widget in Sidebar			
$(document).ready(function(){		 			   
	// Our very special jQuery JSON fucntion call to Flickr, gets details of the most recent images			   
	$.getJSON("http://api.flickr.com/services/feeds/photos_public.gne?id=52617155@N08&lang=en-us&format=json&jsoncallback=?", displayImages);  //YOUR IDGETTR GOES HERE
	function displayImages(data) {																																   
		// Randomly choose where to start. A random number between 0 and the number of photos we grabbed (20) minus  7 (we are displaying 7 photos).
		var iStart = Math.floor(Math.random()*(0));	
		
		// Reset our counter to 0
		var iCount = 1;								
		
		// Start putting together the HTML string
		var htmlString = "<ul>";					
		
		// Now start cycling through our array of Flickr photo details
		$.each(data.items, function(i,item){
									
			// Let's only display 6 photos (a 2x3 grid), starting from a the first point in the feed				
			if (iCount > iStart && iCount < (iStart + 7)) {
				
				// I only want the ickle square thumbnails
				var sourceSquare = (item.media.m).replace("_m.jpg", "_s.jpg");		
				
				// Here's where we piece together the HTML
				htmlString += '<li><a href="' + item.link + '" target="_blank">';
				htmlString += '<img src="' + sourceSquare + '" alt="' + item.title + '" title="' + item.title + '"/>';
				htmlString += '</a></li>';
			}
			// Increase our counter by 1
			iCount++;
		});		
		
	// Pop our HTML in the #images DIV	
	$('#flickrsidebar').html(htmlString + "</ul>");
	
	// Close down the JSON function call
	}
	
// The end of our jQuery function	
});

//Lightbox Code
$(document).ready(function() { 
	$("a.fancylightbox").fancybox({
		'titleShow'     : true,
		'titlePosition'	: 'over',
		'transitionIn'	: 'fade',
		'transitionOut'	: 'fade',
		'overlayOpacity': '0.5',
		'overlayColor'  :  '#333'
	});
	$("a[rel=portfolio]").fancybox({
		'titleShow'     : true,
		'titlePosition'	: 'over',
		'transitionIn'	: 'elastic',
		'transitionOut'	: 'elastic',
		'overlayOpacity': '0.5',
		'overlayColor'  :  '#333'
	});
	$(".videolightbox").fancybox({
		'titleShow'     : false,
		'transitionIn'		: 'fade',
		'transitionOut'		: 'fade',
		'type'				: 'iframe',
		'overlayOpacity': '0.5',
		'overlayColor'  :  '#333'
	});
	$(".buttonvideolightbox").fancybox({
		'titleShow'     : false,
		'transitionIn'		: 'fade',
		'transitionOut'		: 'fade',
		'type'				: 'iframe',
		'overlayOpacity': '0.5',
		'overlayColor'  :  '#333'
	});
});

//Transparency Adjustments
$(document).ready(function() {  
            $('.transparent').each(function() {
                $(this).hover(
                    function() {
                        $(this).stop().animate({ opacity: 0.7 }, 400);
                    },
                   function() {
                       $(this).stop().animate({ opacity: 1.0 }, 400);
                   })
                });
});

//Accordion slider
$(document).ready(function() { 


$("a#toggleBarcelona").click(function(){
			$("#slideBarcelona").slideToggle();
			return false;
			});
$("a#toggleCharis").click(function(){
			$("#slideCharis").slideToggle();
			return false;
			});
$("a#toggleJeanine").click(function(){
			$("#slideJeanine").slideToggle();
			return false;
			});
$("a#toggleOdessa").click(function(){
			$("#slideOdessa").slideToggle();
			return false;
			});
$("a#toggleVeni").click(function(){
			$("#slideVeni").slideToggle();
			return false;
			});
$("a#toggleRosette").click(function(){
			$("#slideRosette").slideToggle();
			return false;
			});
$("a#toggleAntwerp").click(function(){
			$("#slideAntwerp").slideToggle();
			return false;
			});
$("a#toggleAquateam").click(function(){
			$("#slideAquateam").slideToggle();
			return false;
			});
$("a#toggleCyrano").click(function(){
			$("#slideCyrano").slideToggle();
			return false;
			});
$("a#toggleDelfshaven").click(function(){
			$("#slideDelfshaven").slideToggle();
			return false;
			});
$("a#toggleFinitor").click(function(){
			$("#slideFinitor").slideToggle();
			return false;
			});
$("a#toggleFinitor1").click(function(){
			$("#slideFinitor1").slideToggle();
			return false;
			});						
$("a#toggleMilano").click(function(){
			$("#slideMilano").slideToggle();
			return false;
			});
$("a#toggleNavira").click(function(){
			$("#slideNavira").slideToggle();
			return false;
			});
$("a#toggleNewYork").click(function(){
			$("#slideNewYork").slideToggle();
			return false;
			});
$("a#togglePatricia").click(function(){
			$("#slidePatricia").slideToggle();
			return false;
			});	
$("a#toggleSonora").click(function(){
			$("#slideSonora").slideToggle();
			return false;
			});
$("a#toggleSchelde1").click(function(){
			$("#slideSchelde1").slideToggle();
			return false;
			});
$("a#toggleVictrol10").click(function(){
			$("#slideVictrol10").slideToggle();
			return false;
			});
$("a#toggleBrisbane").click(function(){
			$("#slideBrisbane").slideToggle();
			return false;
			});
$("a#toggleROROI").click(function(){
			$("#slideROROI").slideToggle();
			return false;
			});
$("a#toggleROROII").click(function(){
			$("#slideROROII").slideToggle();
			return false;
			});
$("a#toggleROROIII").click(function(){
			$("#slideROROIII").slideToggle();
			return false;
			});
$("a#toggleROROIV").click(function(){
			$("#slideROROIV").slideToggle();
			return false;
			});
$("a#toggleROROV").click(function(){
			$("#slideROROV").slideToggle();
			return false;
			});

$(".toggle-content").hide(); 

	$("h5.toggle").toggle(function(){
		$(this).addClass("active");
		}, function () {
		$(this).removeClass("active");
	});

	$("h5.toggle").click(function(){
		$(this).next(".toggle-content").slideToggle();
	});


});













