/*********************************************************************/
/*********************************************************************/
/*********************************************************************/
/*********************************************************************/
/*********************************************************************/
/*********************************************************************/
// ProjectType = typeof(ProjectType) != 'undefined' ? ProjectType : '';

var logos = [
    { ProjectName:"logotypes", path:"images/identities/logotypes/", Pictures: [
		{ PictureName: 'big_logotypes00.jpg' }, 
		{ PictureName: 'big_logotypes01.jpg' },
		{ PictureName: 'big_logotypes02.jpg' },
		{ PictureName: 'big_logotypes03.jpg' },
		{ PictureName: 'big_logotypes04.jpg' },
		{ PictureName: 'big_logotypes05.jpg' },
		{ PictureName: 'big_logotypes06.jpg' }
	] },
    { ProjectName:"bioguide", path:"images/identities/bioguide/", Pictures: [
		{ PictureName: 'big_bioguide00.jpg', PictureTitle :'Bioguide', PictureText :'This company is working on dentistry solutions in three different directions: software, hardware and services. They provide modern equipment with nice and intuitive interfaces that are suitable for doctors with any level of software experience.', ClientName:'Bioguide' }, 
		{ PictureName: 'big_bioguide01.jpg' },
		{ PictureName: 'big_bioguide02.jpg' }
	] },
    { ProjectName:"ofisnet", path:"images/identities/ofisnet/", Pictures: [
		{ PictureName: 'big_ofisnet00.jpg', PictureTitle :'Ofis.net', PictureText :'This company provides one of the fastest, most secure and effective Enterprise Infrastructure and Application Cloud services in Turkey.', ClientName:'Ofis.net' }, 
		{ PictureName: 'big_ofisnet01.jpg' },
		{ PictureName: 'big_ofisnet02.jpg' },
		{ PictureName: 'big_ofisnet03.jpg' }
	] },
    { ProjectName:"magma", path:"images/identities/magma/", Pictures: [
		{ PictureName: 'big_magma00.jpg', PictureTitle :'Magma', PictureText :'As a branch of Bioguide company, Magma Software works mainly on 2D and 3D dentistry applications. They cover almost every area of specialization: surgery, orthodontics, implantology and prosthetics.', ClientName:'Magma' }, 
		{ PictureName: 'big_magma01.jpg' },
		{ PictureName: 'big_magma02.jpg' }
	] },
    { ProjectName:"infalco", path:"images/identities/infalco/", Pictures: [
		{ PictureName: 'big_infalco00.jpg', PictureTitle :'Infalco', PictureText :'An entertainment on-line resource with mobile content. They also make custom iPhone media-related applications.', ClientName:'Infalco' }, 
		{ PictureName: 'big_infalco01.jpg' },
		{ PictureName: 'big_infalco02.jpg' }
	] },
    { ProjectName:"kayako", path:"images/identities/kayako/", Pictures: [
		{ PictureName: 'big_kayako00.jpg', PictureTitle :'Kayako', PictureText :'Kayako is one of leading web-centric helpdesk and customer engagement software developers. They offer several packages to satisfy any customer, starting from simple ticket and e-mail management up to solutions with live chat, visitor monitoring, remote desktop support and VoIP integration.', ClientName:'Kayako' }, 
		{ PictureName: 'big_kayako01.jpg' },
		{ PictureName: 'big_kayako02.jpg' },
		{ PictureName: 'big_kayako03.jpg' },
		{ PictureName: 'big_kayako04.jpg' },
		{ PictureName: 'big_kayako05.jpg' },
		{ PictureName: 'big_kayako06.jpg' }
	] }
];
/* */

/*********************************************************************/

var icons = [
    { ProjectName:"alice", path:"images/icons/alice/", Pictures: [
		{ PictureName: 'big_alice00.jpg', PictureTitle :'Alice in Wonderland icons', PictureText :'&ldquo;Let me think. Was I the same when I got up this morning? I almost think I can remember feeling a little different. But if I&rsquo;m not the same, the next question is &lsquo;Who in the world am I?&rsquo; Ah, that&rsquo;s the great puzzle!&rdquo;', ClientName:'Internal Project' },
		{ PictureName: 'big_alice01.jpg' },
		{ PictureName: 'big_alice02.jpg' },
		{ PictureName: 'big_alice03.jpg' },
		{ PictureName: 'big_alice04.jpg' },
		{ PictureName: 'big_alice05.jpg' }
	]},
    { ProjectName:"avatar", path:"images/icons/avatar/", Pictures: [
		{ PictureName: 'big_avatar00.jpg', PictureTitle :'Avatar icons', PictureText :'When James Cameron had finished filming his fictional universe, of course we couldn&rsquo;t refrain from all this and did few nice icons of flora and fauna of the beautiful Pandora planet.', ClientName:'Internal Project' }, 
		{ PictureName: 'big_avatar01.jpg' },
		{ PictureName: 'big_avatar02.jpg' },
		{ PictureName: 'big_avatar03.jpg' },
		{ PictureName: 'big_avatar04.jpg' },
		{ PictureName: 'big_avatar05.jpg' },
		{ PictureName: 'big_avatar06.jpg' }
	] },
    { ProjectName:"blueicons", path:"images/icons/blueicons/", Pictures: [
		{ PictureName: 'big_blueicons00.jpg', PictureTitle :'Glass icons', PictureText :'This one was our internal project. Just a set of random desktop/dock icons that would be nice to have.', ClientName:'Internal Project' }, 
		{ PictureName: 'big_blueicons01.jpg' },
		{ PictureName: 'big_blueicons02.jpg' },
		{ PictureName: 'big_blueicons03.jpg' }
	] },
    { ProjectName:"cisco", path:"images/icons/cisco/", Pictures: [
		{ PictureName: 'big_cisco00.jpg', PictureTitle :'Cisco Icons', PictureText :'For years we&rsquo;ve been supplying Cisco Systems with various icons, pictograms, diagrams and illustrations. This is a quick glimpse of what we are doing for the company.', ClientName:'Cisco' }, 
		{ PictureName: 'big_cisco01.jpg' },
		{ PictureName: 'big_cisco02.jpg' },
		{ PictureName: 'big_cisco03.jpg' },
		{ PictureName: 'big_cisco04.jpg' },
		{ PictureName: 'big_cisco05.jpg' },
		{ PictureName: 'big_cisco06.jpg' },
		{ PictureName: 'big_cisco07.jpg' }
	] },
    { ProjectName:"halloween", path:"images/icons/halloween/", Pictures: [
		{ PictureName: 'big_halloween00.jpg', PictureTitle :'Cisco Halloween icons', PictureText :'Halloween, celebrated each year on October 31, is a mixture of ancient Celtic practices, Catholic and Roman religious rituals and European folk traditions that blended together over time to create the holiday we know today.', ClientName:'Cisco' }, 
		{ PictureName: 'big_halloween01.jpg' },
		{ PictureName: 'big_halloween02.jpg' },
		{ PictureName: 'big_halloween03.jpg' },
		{ PictureName: 'big_halloween04.jpg' },
		{ PictureName: 'big_halloween05.jpg' },
		{ PictureName: 'big_halloween06.jpg' }
	] },
    { ProjectName:"holidays", path:"images/icons/holidays/", Pictures: [
		{ PictureName: 'big_holidays00.jpg', PictureTitle :'Cisco Holidays and Seasons', PictureText :'Sunny In addition to Halloween and winter theme, this set of icons for Cisco Systems illustrates various holidays and celebrations.', ClientName:'Cisco' }, 
		{ PictureName: 'big_holidays01.jpg' },
		{ PictureName: 'big_holidays02.jpg' },
		{ PictureName: 'big_holidays03.jpg' },
		{ PictureName: 'big_holidays04.jpg' }
	] },
    { ProjectName:"ileopard", path:"images/icons/ileopard/", Pictures: [
		{ PictureName: 'big_ileopard00.jpg', PictureTitle :'<span>i</span>Leopard icons', PictureText :'This was a Mac OS X application containing lots of useful functions like quick picture editing, with adequate set of basic editing tools, import/export, extended work with the clipboard, iPhone synchronization and other features.', ClientName:'iLeopard' }, 
		{ PictureName: 'big_ileopard01.jpg' },
		{ PictureName: 'big_ileopard02.jpg' },
		{ PictureName: 'big_ileopard03.jpg' },
		{ PictureName: 'big_ileopard04.jpg' },
		{ PictureName: 'big_ileopard05.jpg' },
		{ PictureName: 'big_ileopard06.jpg' },
		{ PictureName: 'big_ileopard07.jpg' },
		{ PictureName: 'big_ileopard08.jpg' }
	] },
    { ProjectName:"iphone", path:"images/icons/iphone/", Pictures: [
		{ PictureName: 'big_iphone00.jpg', PictureTitle :'<span>i</span>phone icons', PictureText :'The very first thing that people look at, while browsing the App Store, is the app icon. When working on iPhone/iPad icons we pay special attention to details and right realization of client&rsquo;s idea.', ClientName:'Various Clients' }, 
		{ PictureName: 'big_iphone01.jpg' },
		{ PictureName: 'big_iphone02.jpg' },
		{ PictureName: 'big_iphone03.jpg' }
	] },
    { ProjectName:"nordicbet", path:"images/icons/nordicbet/", Pictures: [
		{ PictureName: 'big_nordicbet00.jpg', PictureTitle :'Nordicbet icons', PictureText :'Various sports related icons and UI elements for a huge gaming and betting service. It is not limited to just soccer, golf or poker. Everyone can find something appropriate to his or her liking.', ClientName:'nordicbet' }, 
		{ PictureName: 'big_nordicbet01.jpg' },
		{ PictureName: 'big_nordicbet02.jpg' }
	] },
    { ProjectName:"rodosweb", path:"images/icons/rodosweb/", Pictures: [
		{ PictureName: 'big_rodosweb00.jpg', PictureTitle :'Rodos Web icons', PictureText :'Ancient looking icons for a big Turkish web hosting company. They represent Blog, Forum, CMS and Domain registration tools which are just a part of all services that they provide.', ClientName:'Rodos Web' }
	] },
    { ProjectName:"wargames", path:"images/icons/wargames/", Pictures: [
		{ PictureName: 'big_wargames00.jpg', PictureTitle :'Icons for Wargames', PictureText :'Free on-line multiplayer war game with over 100 unique land, air and naval units, different terrain types and intuitive easy-to-use interface.', ClientName:'Wargames' }, 
		{ PictureName: 'big_wargames01.jpg' },
		{ PictureName: 'big_wargames02.jpg' }
	] },
    { ProjectName:"winter", path:"images/icons/winter/", Pictures: [
		{ PictureName: 'big_winter00.jpg', PictureTitle :'Cisco Winter Holidays icons', PictureText :'Are you looking forward to play snowball, sculpt a snowman or put on your skis and slide down the smooth slope, covered with plenty of snow? Let&rsquo;s look through these winter themmed icons for Cisco Systems.', ClientName:'Cisco' }, 
		{ PictureName: 'big_winter01.jpg' },
		{ PictureName: 'big_winter02.jpg' },
		{ PictureName: 'big_winter03.jpg' },
		{ PictureName: 'big_winter04.jpg' }
	] },
    { ProjectName:"zoho", path:"images/icons/zoho/", Pictures: [
		{ PictureName: 'big_zoho00.jpg', PictureTitle :'Zoho icons', PictureText :'More than 20 applications for business and collaboration had their icons renewed. This fully customizable massive online tool includes text and table editors, CRM, mail, accounting software and much more other useful features.', ClientName:'Zoho' }, 
		{ PictureName: 'big_zoho01.jpg' },
		{ PictureName: 'big_zoho02.jpg' },
		{ PictureName: 'big_zoho03.jpg' },
		{ PictureName: 'big_zoho04.jpg' }
	] }
];

/* */
/*********************************************************************/


var illustrations = [
    { ProjectName:"farm", path:"images/illustrations/farm/", Pictures: [
		{ PictureName: 'big_farm00.jpg', PictureTitle :'Farm', PictureText :'A client from Norway ordered these images to use in a specific quiz that tells you what sort of farmer you are. So we did visual representations of those types.', ClientName:'Norway Farm' }
	] },
    { ProjectName:"jus", path:"images/illustrations/jus/", Pictures: [
		{ PictureName: 'big_jus00.jpg', PictureTitle :'Jus', PictureText :'They say in case of regular taking this beverage works like magic. Over 23 natural ingredients including fruits, berries and even mushrooms create this unusual mixture of healthy and tasty drink. Some of those you can find here.', ClientName:'Jus' }, 
		{ PictureName: 'big_jus01.jpg' },
		{ PictureName: 'big_jus02.jpg' },
		{ PictureName: 'big_jus03.jpg' },
		{ PictureName: 'big_jus04.jpg' },
		{ PictureName: 'big_jus05.jpg' },
		{ PictureName: 'big_jus06.jpg' },
		{ PictureName: 'big_jus07.jpg' },
		{ PictureName: 'big_jus08.jpg' }
	] },
    { ProjectName:"tucanna", path:"images/illustrations/tucanna/", Pictures: [
		{ PictureName: 'big_tucanna00.jpg', PictureTitle :'Tucanna', PictureText :'A great team of innovative software developers with high ambitions and a totally proper approach to the coding process and project management.', ClientName:'Tucanna' }, 
		{ PictureName: 'big_tucanna01.jpg' },
		{ PictureName: 'big_tucanna02.jpg' }
	] }
];
/* */

/*********************************************************************/


var igui = [
    { ProjectName:"camgenius", path:"images/igui/camgenius/", Pictures: [
		{ PictureName: 'big_camgenius00.jpg', PictureTitle :'Camera Genius', PictureText :'A camera application that significantly increase standard functionality. It works on almost any Apple device that has iOS 4.0+ installed. It has separate focus and exposure areas, picture editing tools and effects, social network sharing feature and more...', ClientName:'Codegoo' }, 
		{ PictureName: 'big_camgenius01.jpg' },
		{ PictureName: 'big_camgenius02.jpg' },
		{ PictureName: 'big_camgenius03.jpg' },
		{ PictureName: 'big_camgenius04.jpg' },
		{ PictureName: 'big_camgenius05.jpg' },
		{ PictureName: 'big_camgenius06.jpg' },
		{ PictureName: 'big_camgenius07.jpg' },
		{ PictureName: 'big_camgenius08.jpg' }
	] }
];
/* */

/*********************************************************************/


var sites = [
    { ProjectName:"greensworld", path:"images/sites/greensworld/", Pictures: [
		{ PictureName: 'big_greensworld00.jpg', PictureTitle :'Greensworld', PictureText :'An innovative group of scientists who deliver highest quality nutritional supplement products made from natural ingredients. Modern and clean design compliments new branding very well.', ClientName:'Greensworld' }, 
		{ PictureName: 'big_greensworld01.jpg' },
		{ PictureName: 'big_greensworld02.jpg' }
	] },
    { ProjectName:"infusionsoft", path:"images/sites/infusionsoft/", Pictures: [
		{ PictureName: 'big_infusionsoft00.jpg', PictureTitle :'Infusionsoft', PictureText :'To successfully promote and support their all-in-one CRM system, Infusion Soft ordered a redesign of the product&rsquo;s web page, which had to look ultra modern, clean and eye-catching.', ClientName:'Infusionsoft' }, 
		{ PictureName: 'big_infusionsoft01.jpg' }
	] },
    { ProjectName:"jus", path:"images/sites/jus/", Pictures: [
		{ PictureName: 'big_jus00.jpg', PictureTitle :'Jus', PictureText :'This site is a home for a Jus beverage manufacturer. Jus is a mixture of more than 23 different ingredients such as fruits, berries and mushrooms.', ClientName:'Jus' }, 
		{ PictureName: 'big_jus01.jpg' },
		{ PictureName: 'big_jus02.jpg' },
		{ PictureName: 'big_jus03.jpg' }
	] },
    { ProjectName:"oliveway", path:"images/sites/oliveway/", Pictures: [
		{ PictureName: 'big_oliveway00.jpg', PictureTitle :'Oliveway', PictureText :'The most advanced technologies and extensive knowledge of plants allow Oliveway to offer a wide range of effective natural products. Being a &ldquo;green&rdquo; company they use 100% organic olive oil and other natural components.', ClientName:'Oliveway' }, 
		{ PictureName: 'big_oliveway01.jpg' },
		{ PictureName: 'big_oliveway02.jpg' },
		{ PictureName: 'big_oliveway03.jpg' },
		{ PictureName: 'big_oliveway04.jpg' }
	] },
    { ProjectName:"parisgallery", path:"images/sites/parisgallery/", Pictures: [
		{ PictureName: 'big_parisgallery00.jpg', PictureTitle :'Paris Gallery', PictureText :'The biggest retailer network across UAE, Saudi Arabia, Qatar and Bahrain with more than 40 luxurious stores and over 450 clothes, footwear, perfumery and accessories brands to offer.', ClientName:'Paris Gallery' }, 
		{ PictureName: 'big_parisgallery01.jpg' }
	] },
    { ProjectName:"pavlakis", path:"images/sites/pavlakis/", Pictures: [
		{ PictureName: 'big_pavlakis00.jpg', PictureTitle :'Pavlakis', PictureText :'It is a Greek name of the man who can help you to choose a yacht. He could tell you everything about any of his vessels, and even become your captain if you were sailing among beautiful Greek islands.', ClientName:'Pavlakis' }, 
		{ PictureName: 'big_pavlakis01.jpg' },
		{ PictureName: 'big_pavlakis02.jpg' }
	] },
    { ProjectName:"turhost", path:"images/sites/turhost/", Pictures: [
		{ PictureName: 'big_turhost00.jpg', PictureTitle :'Turhost', PictureText :'One of the biggest hosting providers in Turkey decided to redesign their main website and other services represented on the web, so they turned to us. The site had to look smart, trustworthy, modern and serious.', ClientName:'Turhost' }, 
		{ PictureName: 'big_turhost01.jpg' },
		{ PictureName: 'big_turhost02.jpg' },
		{ PictureName: 'big_turhost03.jpg' },
		{ PictureName: 'big_turhost04.jpg' }
	] }
];
/* */

/*********************************************************************/

var interfaces = [
    { ProjectName:"asus", path:"images/interfaces/asus/", Pictures: [
		{ PictureName: 'big_asus00.jpg', PictureTitle :'Asus D200', PictureText :'Here we did a UI for an interesting Atom N270-based hybrid piece of hardware that could be set up as a mini desktop PC, a NAS device, or even as a wireless router or access point.', ClientName:'Asus' },
		{ PictureName: 'big_asus01.jpg' },
		{ PictureName: 'big_asus02.jpg' },
		{ PictureName: 'big_asus03.jpg' }
	] },
    { ProjectName:"dubai", path:"images/interfaces/dubai/", Pictures: [
		{ PictureName: 'big_dubai00.jpg', PictureTitle :'Dubai Mall', PictureText :'An interface for a navigation/help system of a big retail and entertainment complex located in Dubai. Customers can find desired shop or place, its description and virtual route from the help desk. The UI had to be colorful and easy-to-use.', ClientName:'Dubai Mall' }, 
		{ PictureName: 'big_dubai01.jpg' },
		{ PictureName: 'big_dubai02.jpg' },
		{ PictureName: 'big_dubai03.jpg' },
		{ PictureName: 'big_dubai04.jpg' },
		{ PictureName: 'big_dubai05.jpg' }
	] },
    { ProjectName:"eee", path:"images/interfaces/eee_keyboard/", Pictures: [
		{ PictureName: 'big_eee00.jpg', PictureTitle :'Asus Eee Keyboard', PictureText :'This thing has biult-in touchscreen which can display either Windows desktop or a set of controls. It also has wireless HDMI, D-Sub, Ethernet, few USB ports and is driven by Intel Atom processor. A desktop-grade performance in a device a size of a keyboard.', ClientName:'Asus' }, 
		{ PictureName: 'big_eee01.jpg' },
		{ PictureName: 'big_eee02.jpg' },
		{ PictureName: 'big_eee03.jpg' },
		{ PictureName: 'big_eee04.jpg' },
		{ PictureName: 'big_eee05.jpg' }
	] },
    { ProjectName:"infusionsoft", path:"images/interfaces/infusionsoft/", Pictures: [
		{ PictureName: 'big_infusionsoft00.jpg', PictureTitle :'Infusion Soft', PictureText :'This is more than just an ordinary CRM. A complete all-in-one intelligent suit created to help automate marketing and sales, generate invoices, e-mails and more. Clean graphics and easy-to-use interface is a nice supplement to its flexibility.', ClientName:'Infusion Soft' }, 
		{ PictureName: 'big_infusionsoft01.jpg' },
		{ PictureName: 'big_infusionsoft02.jpg' },
		{ PictureName: 'big_infusionsoft03.jpg' }
	] }
];
/* */

/*********************************************************************/
/*********************************************************************/

var config = {
	over: makeTall, // function = onMouseOver callback (REQUIRED)
	interval:1,
	timeout: 100, // number = milliseconds delay before onMouseOut
	out: makeShort // function = onMouseOut callback (REQUIRED)
};
var makeTall = function () {
	// alert("makeTall event");
	
	var SelectedProectNum = $(this).children(".project_name_inner").find("img").attr('id').split('_')[1];

	if(!$(".project_big:visible").hasClass("active")) {
		var ProjectName = $(ProjectType[SelectedProectNum]).data('ProjectName');
		var ProjectImagePath = $(ProjectType[SelectedProectNum]).data('path');
		var ProjectImageArray = $(ProjectType[SelectedProectNum]).data('Pictures');
		var ProjectNumOfImages = ProjectImageArray.length;
	
	$(this).html("").append($('.pre_project_slider').clone().css({'display':'block'}));

	$.each(ProjectImageArray, function(index) {
		var infotext = '';
		var ProjectPictureName = $(this).data('PictureName');
		var ProjectPictureTitle = $(this).data('PictureTitle');
		var ProjectPictureText = $(this).data('PictureText');
		var ProjectClientName = $(this).data('ClientName');


		var result = "<div class=\"panel\"><div class=\"panel-wrapper\"><img src=\""+ ProjectImagePath + ProjectPictureName +"\" width=\"940\" height=\"620\" alt=\"\" /></div></div>\n";

		$(".pre_project_slider:last").find(".coda-slider").attr({'id':"project_slider-"+SelectedProectNum});
		$("#project_slider-"+SelectedProectNum).append(result);
		
		

		if(ProjectPictureTitle || ProjectPictureText) {
			infotext += "<div class=\"project_big_text\">";
			if(ProjectClientName) { 
				if(ProjectClientName == 'Internal Project' || ProjectClientName == 'Various Clients') { 
					infotext += '<div class="project_client">' + ProjectClientName + '</div>';
				} else {
					infotext += '<div class="project_client">client &mdash; <span>' + ProjectClientName + '</span></div>';
				}
			}
			if(ProjectPictureTitle) { infotext += "<h3>"+ProjectPictureTitle+"</h3>"; }
			if(ProjectPictureText) { infotext += "<p>"+ProjectPictureText+"</p>"; }
			infotext += "</div>";

			$("#project_slider-"+SelectedProectNum).children(":last").append(infotext);
		}
		
	});
	
	if(ProjectNumOfImages > 1) {  }
	
	// $(this).html("").append($('.pre_project_slider').clone().css({'display':'block'})).find(".coda-slider");
	$("#project_slider-"+SelectedProectNum).codaSlider();
	
	if(ProjectNumOfImages > 1) {
		var imagebullets = '';
		for( i=0; i < ProjectNumOfImages; i++){
			imagebullets += "<img src=\"images/x.gif\" alt=\"\" />";
		}
	
		$(this).find(".project_list_pages").remove();
		$(this).prepend("<div class=\"project_list_pages\"><div>"+ imagebullets +"</div></div>");
		$(this).find('.project_list_pages').find("img:eq(0)").addClass("selected");
		$(this).find('.project_list_pages').css('display','block');
	}

	
/*	
if (!$(':animated').length) {  }
*/

	$(".project_list_pages").find("img").click(function() {
		// var SelectedProjectNum = $(this).parent();
		// $('.project_big:eq('+SelectedProectNum+')').css({'border':'solid 3px #0f0'});
	
		var clickedBullet = $(".project_list_pages").find("img").index(this);
		var clickedBulletPictureWidth = $(this).parent().parent().parent().find(".panel-container").find(".panel").eq(0).width();
		var clickedOffcet = -(clickedBulletPictureWidth*clickedBullet);
		var slideEaseDuration = 1000;
		
		// alert(clickedBulletPictureWidth);

		$(".project_list_pages").find("img").removeClass("selected");
		$(this).addClass("selected");

		$(this).parents().find(".panel-container").animate({ marginLeft: clickedOffcet }, slideEaseDuration, function() {
			$(this).children(".panel").removeClass("selected").eq(clickedBullet).addClass("selected");
			
			if(clickedBullet == 0) { $(".coda-nav-left").hide(); $(".coda-nav-right").show().children().css({'width':'940px'}); 
				
			}
			if(clickedBullet > 0) { $(".coda-nav-left").show().children().css({'width':'350px'}); $(".coda-nav-right").show().children().css({'width':'350px'}); }
			if(clickedBullet >= (ProjectNumOfImages - 1)) { $(".coda-nav-left").show().children().css({'width':'350px'}); $(".coda-nav-right").hide().children().css({'width':'350px'}); }
		});
		
		if(clickedBullet == 0) {
			$('.project_list_pages').delay(480).animate({'left':'690px'}, 470);
			$('.project_list_pages').find('div').delay(490).animate({'margin-left':'0px'}, 300);
		}
		if(clickedBullet > 0) { 
			$('.project_list_pages').animate({'left':'445px'}, 500);
			$('.project_list_pages').find('div').animate({'margin-left':'-50%'}, 500);
		}
		
		
	});

	

}	
	
};
var makeShort = function () {
	var urlimage = ["logotypes", "bioguide", "ofisnet", "magma", "infalco", "kayako"];
	var SelectedProectNum = $(this).find(".coda-slider").attr('id').split('-')[1];
	var ConvertToimagePath = $(ProjectType[SelectedProectNum]).data('path');
	// var ConvertToimagePath = 'images/'+ ProjectType +'/'+ ProjectName +'/';
};
/*********************************************************************/
/*********************************************************************/
/*********************************************************************/
/*********************************************************************/
/*********************************************************************/
/*********************************************************************/
function preload(images) {
    if (typeof document.body == "undefined") return;
    try {
        var div = document.createElement("div");
        var s = div.style;
        s.position = "absolute";
        s.top = s.left = 0;
        s.visibility = "hidden";
        document.body.appendChild(div);
        div.innerHTML = "<img src=\"" + images.join("\" /><img src=\"") + "\" />";
    } catch(e) {
        // Error. Do nothing.
    }
}


$(document).ready(function () {
	$('.preview_image').unbind('dblclick');
	$('.preview_image').dblclick( function () { /*  */ return false; });


	$('.projects_preview').find("a").hover(function(){ $(this).next().css({'color':'#ff301b'}); }, function(){ $(this).next().css({'color':'#00d8ff'}); });



/* Code for iPhone&&iPad started here */ 
/* Code for iPhone&&iPad ended here */ 
if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) || (navigator.userAgent.match(/iPad/i))) {
	$(".header_menu a").bind('touchstart', function() {
		$(".header_menu").removeClass("selected");
		$(this).addClass("selected");
	});
	$(".footer_copyr").find(".copyr").css({'position':'relative', 'bottom':'0px'});
} else {

// CopyRight Position START
	var theDivCopyR = $(".copyr");
	var totalHeight = theDivCopyR.height();
	totalHeight += parseInt(theDivCopyR.css("padding-top"), 10) + parseInt(theDivCopyR.css("padding-bottom"), 10); //Total Padding Width
	totalHeight += parseInt(theDivCopyR.css("margin-top"), 10) + parseInt(theDivCopyR.css("margin-bottom"), 10); //Total Margin Width
	totalHeight += parseInt(theDivCopyR.css("borderTopWidth"), 10) + parseInt(theDivCopyR.css("borderBottomWidth"), 10); //Total Border Width
	
	var copyrPosition = $(".copyr").position().top;
	var copyrHeight = $(".copyr").height();
	var positionOfCopyR = copyrPosition + totalHeight;
	

	// alert("window height: " + $(window).height());

if(positionOfCopyR < $(window).height()) {
	$(".copyr").css({'position':'absolute', 'bottom':'0px'});
}	
	
$(window).resize(function() {
	if(positionOfCopyR < $(window).height()) {
		$(".copyr").css({'position':'absolute', 'bottom':'0px'});
	} else {
		$(".copyr").css({'position':'relative', 'bottom':'0px'});
	}
});

// CopyRight Position END

}

/*   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!   */
$('.preview_image').click(function() {
	// $(this).css({'border':'solid 3px #0f0'});
});
$('.preview_image').find("a").click(function() {
	$('.preview_image').dblclick( function () { /* alert("Hello World!"); */ return false;  });

	var ClickedPreviewPic = $(this).parent(".preview_image");
	
	// ClickedPreviewPic.css({'border':'solid 3px #0f0'});

	
    if ($(':animated').length) {
        return false;
    }
	
	var SelectedProectNum = $('.preview_image').index(ClickedPreviewPic);
	// alert("SelectedProectNum: "+ SelectedProectNum);
	var ProjectImagePath = $(ProjectType[SelectedProectNum]).data('path');
	var ProjectName = $(ProjectType[SelectedProectNum]).data('ProjectName');
	
	var hash_mesh = $(this).attr('href').split('#')[1];
	var HashProjectName = hash_mesh.split('/')[1];
	var HashPictureNum = hash_mesh.split('/')[2];

	window.location.replace(pathname  +'#'+ hash_mesh);
	// $(".project_big").unbind("mouseenter").unbind("mouseleave");

	
	$(".copyr").css({'position':'relative', 'bottom':'0px'});
	
	
	var clickedPic = $('.preview_image').index(ClickedPreviewPic);
	var clickedPicture = ClickedPreviewPic;
	var countBigPict = ClickedPreviewPic.index(ClickedPreviewPic);
	var countTotalPreviewRows = Math.ceil(countSmallPreviews / ImagesPerRow);
	var clickedPreviewOnRow = Math.ceil((SelectedProectNum + 1) / ImagesPerRow) - 1;
	var currentBigPictureOnRow = $(".project_big").index($(".project_big:visible"));
	var urlimagePath = $(ProjectType[SelectedProectNum]).data('path');
	
	$('div').remove('.image_loader');

	if(!(ClickedPreviewPic.hasClass("preview_image_selected"))) {
		ClickedPreviewPic.prepend("<div class=\"image_loader\"><img src=\"./images/loadinfo.gif\"></div>");
		$('.preview_image_selected').removeClass('preview_image_selected');
	
	

// Если выбранная картинка на той же строке, что и прошлая
		if(clickedPreviewOnRow == currentBigPictureOnRow) {
			if(!$('.project_big:eq('+clickedPreviewOnRow+')').hasClass("active")) {
				$('.project_big:eq('+clickedPreviewOnRow+')').addClass("active");
			
		
				preload(urlimagePath+'big'+ProjectName+'.jpg')
				var lineToSelectScroll = $('.project_big:eq('+clickedPreviewOnRow+')');

				if(lineToSelectScroll.find(".panel-container").length > 0) {
					// Если слайдер уже был загружен и запущен

					CurrentImage = $('.project_big:eq('+ clickedPreviewOnRow +')').find(".panel.selected");
					
					if(lineToSelectScroll.find(".panel.selected").find(".project_big_text").length > 0) {
						// Если на этом кадре есть текстовая строчка с заголовком
						// alert("Wow, this screen contain text block with title and text");

						$('.project_big:eq('+ clickedPreviewOnRow +')').after("<div class=\"project_big\"></div>").next().hide().append($(".project_big_tmpl").clone().html()).find(".project_name_inner").empty().append(CurrentImage.find("img").clone()).append($('<img />').attr({'src': urlimagePath+'big_'+ProjectName+'00.jpg', 'alt' : '', 'width': '940', 'height': '620', 'id':'projectid_'+SelectedProectNum})).next().html(CurrentImage.find(".project_big_text").clone().html()).parent().prepend(CurrentImage.parents().eq(4).find(".project_list_pages").clone()).show().prev().remove(); // 
						// return false;
					} else { 
						// Если нет текстовой строчки с заголовком
						// alert("Wow, this screen not contain text block with title and text");
						$('.project_big:eq('+ clickedPreviewOnRow +')').after("<div class=\"project_big\"></div>").next().hide().append($(".project_big_tmpl").clone().html()).find(".project_big_text").empty().css({'display':'none'}).prev().empty().append(CurrentImage.find("img").clone()).append($('<img />').attr({'src': urlimagePath+'big_'+ProjectName+'00.jpg', 'alt' : '', 'width': '940', 'height': '620', 'id':'projectid_'+SelectedProectNum})).parent().show().prev().remove();

						// return false;
					}
					
					// return false;
					
				} else {
					// Если слайдер не был загружен и запущен
					// alert("Slider wasn't launched or started");
					$('<img />').attr({'src': urlimagePath+'big_'+ProjectName+'00.jpg', 'alt' : '', 'width': '940', 'height': '620', 'id':'projectid_'+SelectedProectNum}).appendTo('.project_big:eq('+clickedPreviewOnRow+') .project_name_inner');
				}
			

				$('.project_big:eq('+clickedPreviewOnRow+')').find(".project_big_text, .project_list_pages").fadeOut('slow', function() {
					var lineToSelectScroll = $('.project_big:eq('+clickedPreviewOnRow+')');
					var scrollAmount = $(lineToSelectScroll).find(".project_name_inner");

					$(this).prev().css({'width':scrollAmount.width()*2}).animate({left: -(scrollAmount.width()/2)}, autoHeightEaseDuration, function(){
						$(this).children('img:last').css({'position':'absolute'});
						$(this).css({'left':'0px', 'width':'auto'});
						$(".project_big:eq("+currentBigPictureOnRow+") img:not(:last)").remove();
						$(this).children('img:last').css({'position':'static'});

						var TextOfProjectTo = $(lineToSelectScroll).children(".project_big_text");
						var TextOfProjectFrom = $(clickedPicture).children(".project_big_text_info");
						
						
						// Try to get text from Array
						var ProjectName = $(ProjectType[SelectedProectNum]).data('ProjectName');
						var ProjectPictureArray = $(ProjectType[SelectedProectNum]).data('Pictures');
						var ProjectPictureTitle = $(ProjectPictureArray[0]).data('PictureTitle');
						var ProjectPictureText = $(ProjectPictureArray[0]).data('PictureText');			
						var ProjectClientName = $(ProjectPictureArray[0]).data('ClientName');
						var ProjectNumOfImages = ProjectPictureArray.length;
						
						
						if(ProjectPictureText) {
							TextOfProjectTo.html("<h3>"+ ProjectPictureTitle +"</h3><p>" + ProjectPictureText + "</p>");
							
							if(ProjectClientName) { 
								if(ProjectClientName == 'Internal Project' || ProjectClientName == 'Various Clients') { 
									$('.project_big:eq('+clickedPreviewOnRow+')').find('.project_big_text').prepend('<div class="project_client">' + ProjectClientName + '</div>');
								} else {
									$('.project_big:eq('+clickedPreviewOnRow+')').find('.project_big_text').prepend('<div class="project_client">client &mdash; <span>' + ProjectClientName + '</span></div>');
								}
							}
							
							$(lineToSelectScroll).children(".project_big_text").fadeIn('slow');
						}
						if(ProjectNumOfImages > 1) {
							// alert(ProjectNumOfImages);
							// refresh images bullets list
							var imagebullets = '';
							for( i=0; i < ProjectNumOfImages; i++){
								imagebullets += "<img src=\"images/x.gif\" alt=\"\" />";  // <a href=\"#/"+ ProjectName +"/"+ i +"\"></a>
							}
							$('.project_big:eq('+clickedPreviewOnRow+')').find(".project_list_pages").remove();
							$('.project_big:eq('+clickedPreviewOnRow+')').prepend("<div class=\"project_list_pages\"><div>"+ imagebullets +"</div></div>");
							$('.project_big:eq('+clickedPreviewOnRow+')').find('.project_list_pages').find("img:eq(0)").addClass("selected");
						}
						$(lineToSelectScroll).children(".project_list_pages").fadeIn('slow');
						
						// Try to get text from Array END
						
						var ScrollToPosition = $('.project_big:eq('+clickedPreviewOnRow+')').position().top  + 70;
						$('html, body').animate({scrollTop:ScrollToPosition}, autoHeightEaseDuration);
						
						$(".project_big").before("<div style=\"width:960px; height:650px; position:absolute; z-index:2000\">&nbsp;</div>").prev().hide(800);
						
					});

				});
				
				$('.project_big:eq('+clickedPreviewOnRow+')').removeClass("active");
				if(!$('.project_big:eq('+clickedPreviewOnRow+')').hasClass("active")) {
					$(".project_big").bind("mouseenter", makeTall).bind("mouseleave", makeShort);
				}
				
			
			} else { return false; }
		} else {
			// В случае если выбранная картинка на на следующей строке
			if($.browser.msie) { $('.project_big').hide(); }
			$('.project_big').slideUp('slow', function() { $(this).html("").append($(".project_big_tmpl").clone().html()); });
			
			$('<img />').attr({'src': ProjectImagePath+'big_'+ProjectName+'00.jpg', 'alt' : '', 'width': '940', 'height': '620', 'id':'projectid_' + SelectedProectNum}).appendTo('.project_big:eq('+clickedPreviewOnRow+') .project_name_inner');

			$(".project_big:eq("+clickedPreviewOnRow+") img:not(:last)").remove();

			var TextOfProjectTo = $('.project_big:eq('+clickedPreviewOnRow+')').children(".project_big_text").css({'display':'none'});
			var TextOfProjectFrom = $(clickedPicture).children(".project_big_text_info");

			// Try to get text from Array
			var ProjectName = $(ProjectType[SelectedProectNum]).data('ProjectName');
			var ProjectPictureArray = $(ProjectType[SelectedProectNum]).data('Pictures');
			var ProjectPictureTitle = $(ProjectPictureArray[0]).data('PictureTitle');
			var ProjectPictureText = $(ProjectPictureArray[0]).data('PictureText');					
			var ProjectClientName = $(ProjectPictureArray[0]).data('ClientName');
			var ProjectNumOfImages = ProjectPictureArray.length;
					
			if(ProjectPictureText) {
				TextOfProjectTo.html("<h3>"+ ProjectPictureTitle +"</h3><p>" + ProjectPictureText + "</p>");
				
				if(ProjectClientName) { 
					if(ProjectClientName == 'Internal Project' || ProjectClientName == 'Various Clients') { 
						$('.project_big:eq('+clickedPreviewOnRow+')').find('.project_big_text').prepend('<div class="project_client">' + ProjectClientName + '</div>');
					} else {
						$('.project_big:eq('+clickedPreviewOnRow+')').find('.project_big_text').prepend('<div class="project_client">client &mdash; <span>' + ProjectClientName + '</span></div>');
					}
				}
				
				$(lineToSelectScroll).children(".project_big_text").fadeIn('slow');						
			} else {
				TextOfProjectTo.html("");
			}
			// Try to get text from Array END

			if(ProjectNumOfImages > 1) {
				// alert(ProjectNumOfImages);
				// refresh images bullets list
				var imagebullets = '';
				for( i=0; i < ProjectNumOfImages; i++){
					imagebullets += "<img src=\"images/x.gif\" alt=\"\" />";  // <a href=\"#/"+ ProjectName +"/"+ i +"\"></a>
				}
				$('.project_big:eq('+clickedPreviewOnRow+')').find(".project_list_pages").remove();
				$('.project_big:eq('+clickedPreviewOnRow+')').prepend("<div class=\"project_list_pages\"><div>"+ imagebullets +"</div></div>");
				$('.project_big:eq('+clickedPreviewOnRow+')').find('.project_list_pages').find("img:eq(0)").addClass("selected");
				$('.project_big:eq('+clickedPreviewOnRow+')').find('.project_list_pages').css('display','none');
			}
			
			

			$('.project_big:eq('+clickedPreviewOnRow+') .project_name_inner').css({'overflow': 'inherit'});
			$('.project_big:eq('+clickedPreviewOnRow+')').addClass('active').animate({'height':'toggle'}, autoHeightEaseDuration, function() {
				var ScrollToPosition = $('.project_big:eq('+clickedPreviewOnRow+')').position().top  + 70;
				$('html, body').animate({scrollTop:ScrollToPosition}, autoHeightEaseDuration, function() {
					// alert("done");
					// 
					
					$(".project_big").before("<div style=\"width:960px; height:650px; position:absolute; z-index:2000;\" class=\"afterAnimationEnd\">&nbsp;</div>").prev(".afterAnimationEnd").hide(800, function() { $(this).remove(); });

					$('.project_big:eq('+clickedPreviewOnRow+')').removeClass('active')
					$('.project_big:eq('+clickedPreviewOnRow+')').bind("mouseenter", makeTall).bind("mouseleave", makeShort);
				});
				
				
				
				// $('.project_big:eq('+clickedPreviewOnRow+')').before('<div style="width:940px;height:620px; margin-left:10px; background:#0f0; position:absolute; left:0px; z-index:999999" class="afterAnimationEnd">&nbsp;</div>').parent().find('.afterAnimationEnd').delay(10000).css({'background':'#F0F'});

				if(TextOfProjectTo.html().length > 5) {
					TextOfProjectTo.fadeIn('slow', function() { $('.project_big:eq('+clickedPreviewOnRow+')').find(".project_list_pages").fadeIn('slow'); });
				} else {
					$('.project_big:eq('+clickedPreviewOnRow+')').find(".project_list_pages").fadeIn('slow');
				}
				$(lineToSelectScroll).children(".project_list_pages").fadeIn('slow');
				$(".project_big").before("<div style=\"width:960px; height:650px; position:absolute; z-index:2000\">&nbsp;</div>").prev().hide(800);
				
			});

			if(!$(".project_big:eq("+clickedPreviewOnRow+")").hasClass("active")) {
				$(".project_big:eq("+clickedPreviewOnRow+")").hover(function() {
					$('.project_big:eq('+clickedPreviewOnRow+')').bind("mouseenter", makeTall).bind("mouseleave", makeShort);
				}, function() {  });
			}

			
		}
	

	
		$(".project_big:eq("+clickedPreviewOnRow+")").hover(function(){
			// $(this).children(".project_name_inner").append("<div>d</div>").css({'background':'#0F0', width:'940px', height:'640px', position:'absolute'});
		});	

	
	
	
	}

	ClickedPreviewPic.addClass('preview_image_selected');
	$('div').remove('.image_loader');
	// В обратном случае

});


// Preview Image onClick animation STOP


	var autoHeightEaseDuration = 1000;
	var ImagesPerRow = 4;
	var urlimage = ["logotypes", "bioguide", "ofisnet", "magma", "infalco", "kayako"];
	var countSmallPreviews = $(".preview_image").size();
	// $('.project_big').hide();
	// $('.project_big:eq(0)').show();
	
	
//  Preloading Image
//  Animation moving from A to B

	var hash = window.location.hash;
	var pathname = window.location.pathname;
	
	// var SelectedProectNum = $(".preview_image").index($('.preview_image_selected'));
	// var ProjectName = $(ProjectType[SelectedProectNum]).data('ProjectName');
	// var ProjectImagePath = $(ProjectType[SelectedProectNum]).data('path');
	// var ProjectImageArray = $(ProjectType[SelectedProectNum]).data('Pictures');


	
	// alert(LoadedProjectOnRow);
	
	if(hash.length > 0) {
		var LoadHashProjectName = hash.split('/')[1];
		var LoadHashPictureNum = hash.split('/')[2];

		var UrlToImageNum = -1;
		$.each(ProjectType, function(key, value) { 
			if($(ProjectType[key]).data('ProjectName') == LoadHashProjectName) {
				UrlToImageNum = key;
			}
		});
		var LoadedProjectOnRow = Math.ceil((UrlToImageNum + 1) / ImagesPerRow) -1;		


		if(UrlToImageNum != "-1") {
			$(".copyr").css({'position':'relative', 'bottom':'0px'});
			
			var currentBigPictureOnRow = $(".project_big").index($(".project_big:visible"));
			var TheProjectName = $(ProjectType[UrlToImageNum]).data('ProjectName');
			var ProjectImagePath = $(ProjectType[UrlToImageNum]).data('path');
			var ProjectPictureArray = $(ProjectType[UrlToImageNum]).data('Pictures');
			var ProjectNumOfImages = $(ProjectPictureArray).length;
			var ProjectPictureText = $(ProjectType[UrlToImageNum]).data('PictureText');


			// $(".project_big").css({'display':'none'});
			$(".preview_image").removeClass("preview_image_selected");
			$(".preview_image").eq(UrlToImageNum).addClass("preview_image_selected");
			
			$('.project_big:eq('+LoadedProjectOnRow+')').find('.project_name_inner').html("");
			$('<img />').attr({'src': ProjectImagePath+'big_'+TheProjectName+'00.jpg', 'alt' : '', 'width': '940', 'height': '620', 'id':'projectid_'+UrlToImageNum}).appendTo($('.project_big:eq('+LoadedProjectOnRow+')').find('.project_name_inner'));
			
			$('.project_big:eq('+LoadedProjectOnRow+')').find('.project_big_text').css({'display':'none'});

			// Try to get text from Array
			var ProjectPictureTitle = $(ProjectPictureArray[0]).data('PictureTitle');
			var ProjectPictureText = $(ProjectPictureArray[0]).data('PictureText');
			var ProjectClientName = $(ProjectPictureArray[0]).data('ClientName');

			if(ProjectPictureTitle) {
				$('.project_big:eq('+LoadedProjectOnRow+')').find('.project_big_text').html("<h3>"+ ProjectPictureTitle +"</h3>\n<p>"+ ProjectPictureText +"</p>").fadeIn('slow');
			} else {
				$('.project_big:eq('+LoadedProjectOnRow+')').find('.project_big_text').html('');
			}
			if(ProjectClientName) { 
			
				if(ProjectClientName == 'Internal Project' || ProjectClientName == 'Various Clients') { 
					$('.project_big:eq('+LoadedProjectOnRow+')').find('.project_big_text').prepend('<div class="project_client">' + ProjectClientName + '</div>');
				} else {
					$('.project_big:eq('+LoadedProjectOnRow+')').find('.project_big_text').prepend('<div class="project_client">client &mdash; <span>' + ProjectClientName + '</span></div>');
				}
				
			}

			if(ProjectNumOfImages > 1) {
				var imagebullets = '';
				for( i=0; i < ProjectNumOfImages; i++){
					imagebullets += "<img src=\"images/x.gif\" alt=\"\" />";
				}
				$('.project_big:eq('+LoadedProjectOnRow+')').prepend("<div class=\"project_list_pages\"><div>"+ imagebullets +"</div></div>");
				$('.project_big:eq('+LoadedProjectOnRow+')').find('.project_list_pages').find("img:eq("+LoadHashPictureNum+")").addClass("selected");
			}
			
			// Try to get text from Array END
			
			$(".project_big").eq(LoadedProjectOnRow).css({'display':'block'}).children('.project_name_inner').find('img').attr({'src': ProjectImagePath+'big_'+TheProjectName+'00.jpg', 'alt' : '', 'width': '940', 'height': '620', 'id':'projectid_'+UrlToImageNum});
			
			
			
		} else {
			// alert(UrlToImageNum);
			$(".project_big").hide();
			$('.preview_image_selected').removeClass('preview_image_selected');
			window.location = window.location.pathname;
		}

//  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
		$(".project_big").eq(LoadedProjectOnRow).hover(makeTall, function() {});
//  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

		// alert(LoadedProjectOnRow);
		var ScrollToPosition = $(".project_big:eq("+ LoadedProjectOnRow +")").position().top + 70; // .eq(LoadedProjectOnRow)
		// alert(ScrollToPosition);
		$('html, body').animate({scrollTop:ScrollToPosition}, autoHeightEaseDuration);
		//


		
	} else {
		
		// $(".project_big").hide().next().find(".preview_image").removeClass("preview_image_selected");
		
		/*
		var UrlToImageNum = $(".preview_image_selected").index(".preview_image");
		var ProjectPictureArray = $(ProjectType[UrlToImageNum]).data('Pictures');

		var LoadHashProjectName = $('.project_big').find("img").attr('id').split('_')[1];
		var LoadedProjectOnRow = Math.ceil((LoadHashProjectName) / ImagesPerRow);
		$(".project_big").eq(LoadedProjectOnRow).hover(makeTall);

		
		// Try to get text from Array
		var ProjectNumOfImages = $(ProjectPictureArray).length;
		var ProjectPictureTitle = $(ProjectPictureArray[0]).data('PictureTitle');
		var ProjectPictureText = $(ProjectPictureArray[0]).data('PictureText');
		var ProjectClientName = $(ProjectPictureArray[0]).data('ClientName');
		
		
		if(ProjectPictureTitle) {
			$('.project_big:eq('+LoadedProjectOnRow+')').find('.project_big_text').html("<h3>"+ ProjectPictureTitle +"</h3>\n<p>"+ ProjectPictureText +"</p>").fadeIn('slow');
		} else {
			$('.project_big:eq('+LoadedProjectOnRow+')').find('.project_big_text').html('');
		}
		
		if(ProjectClientName) { $('.project_big:eq('+LoadedProjectOnRow+')').find('.project_big_text').prepend('<div class="project_client">client &mdash; <span>' + ProjectClientName + '</span></div>'); }
		
		if(ProjectNumOfImages > 1) { // bullets for select image
			var imagebullets = '';
			for( i=0; i < ProjectNumOfImages; i++){
				imagebullets += "<img src=\"images/x.gif\" alt=\"\" />"; // <a href=\"#/"+ LoadHashProjectName +"/"+ i +"\">  </a>
			}
			$('.project_big:eq('+LoadedProjectOnRow+')').prepend("<div class=\"project_list_pages\">"+ imagebullets +"</div>");
			$('.project_big:eq('+LoadedProjectOnRow+')').find('.project_list_pages').find("img:eq(0)").addClass("selected");
		}
		// Try to get text from Array END

		*/

	}



//  Remove Previous image
//  Apply Image Slider

/*
var handler = function() {
	// $(this).css({'border':'#0F0 solid 3px'});
};
var handlerLeave = function() {
	$(this).css({'border':'none'});
}
var	CalcImagePath = function(HashProjectName, HashPictureNum) {
	var pathname = window.location.pathname;
}
*/

/*******************************************
********************************************
***	Script!!!!! 
********************************************
********************************************/



if ($(':animated').length) {
  return false;
}



// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
/*
if (!$(':animated').length) {
	$(".project_big").hoverIntent(config);
}
*/
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

var hash = document.location.hash;

if(hash.length > 0 ) {
	var substr = hash.split('/');
	var ProjectName = substr[1];
	var PictureName = substr[2];
	
	if(ProjectName.length > 0 || PictureName.length > 0) {
		// alert('ProjectName:' + ProjectName + '; PictureName:' + PictureName);
	}
}


});


