$(window).load(function() {
	/*$('#slider').nivoSlider({
		effect:'sliceDown', //Specify sets like: 'fold,fade,sliceDown'
		slices:15,
		animSpeed:1200,
		pauseTime:4000,
		startSlide:0, //Set starting Slide (0 index)
		directionNav:true, //Next & Prev
		directionNavHide:true, //Only show on hover
		controlNav:false, //1,2,3...
		controlNavThumbs:false, //Use thumbnails for Control Nav
      	controlNavThumbsFromRel:false, //Use image rel for thumbs
		controlNavThumbsSearch: '.jpg', //Replace this with...
		controlNavThumbsReplace: '_thumb.jpg', //...this in thumb Image src
		keyboardNav:true, //Use left & right arrows
		pauseOnHover:true, //Stop animation while hovering
		manualAdvance:false, //Force manual transitions
		captionOpacity:0.8, //Universal caption opacity
		beforeChange: function(){},
		afterChange: function(){},
		slideshowEnd: function(){} //Triggers after all slides have been shown
	});*/
	
	// Fancybox Galleries
	
	$("a[rel=gengallery]").fancybox({
		'titleShow'			: false,
		'transitionIn'		: 'elastic',
		'transitionOut'		: 'elastic',
		'autoScale'			: true,
		'overlayColor'		: '#000',
		'overlayOpacity'	: '0.5'
	});
	
	$("a[rel=musallatgallery]").fancybox({
		'titleShow'			: false,
		'transitionIn'		: 'elastic',
		'transitionOut'		: 'elastic',
		'autoScale'			: true,
		'overlayColor'		: '#000',
		'overlayOpacity'	: '0.5'
	});
	
	$("a[rel=kanalizasyongallery]").fancybox({
		'titleShow'			: false,
		'transitionIn'		: 'elastic',
		'transitionOut'		: 'elastic',
		'autoScale'			: true,
		'overlayColor'		: '#000',
		'overlayOpacity'	: '0.5'
	});
	
	$("a[rel=musallatafis]").fancybox({
		'titleShow'			: false,
		'transitionIn'		: 'elastic',
		'transitionOut'		: 'elastic',
		'autoScale'			: true,
		'overlayColor'		: '#000',
		'overlayOpacity'	: '0.5'
	});
	
	$("a[rel=kaosgallery]").fancybox({
		'titleShow'			: false,
		'transitionIn'		: 'elastic',
		'transitionOut'		: 'elastic',
		'autoScale'			: true,
		'overlayColor'		: '#000',
		'overlayOpacity'	: '0.5'
	});
	
	$("a[rel=3harflilergallery]").fancybox({
		'titleShow'			: false,
		'transitionIn'		: 'elastic',
		'transitionOut'		: 'elastic',
		'autoScale'			: true,
		'overlayColor'		: '#000',
		'overlayOpacity'	: '0.5'
	});
	
	$("a[rel=kanalizasyonafis]").fancybox({
		'titleShow'			: false,
		'transitionIn'		: 'elastic',
		'transitionOut'		: 'elastic',
		'autoScale'			: true,
		'overlayColor'		: '#000',
		'overlayOpacity'	: '0.5'
	});
	
	$("a[rel=genafis]").fancybox({
		'titleShow'			: false,
		'transitionIn'		: 'elastic',
		'transitionOut'		: 'elastic',
		'autoScale'			: true,
		'overlayColor'		: '#000',
		'overlayOpacity'	: '0.5'
	});
	
	$("a[rel=3harflilerafis]").fancybox({
		'titleShow'			: false,
		'transitionIn'		: 'elastic',
		'transitionOut'		: 'elastic',
		'autoScale'			: true,
		'overlayColor'		: '#000',
		'overlayOpacity'	: '0.5'
	});
	
	$("a[rel=bayrambayram]").fancybox({
		'titleShow'			: false,
		'transitionIn'		: 'elastic',
		'transitionOut'		: 'elastic',
		'autoScale'			: true,
		'overlayColor'		: '#000',
		'overlayOpacity'	: '0.5'
	});
	
});

function openvideo(videoURL)
{
	//var videocode = '<embed src="http://vimeo.com/moogaloop.swf?clip_id='+ videoURL +'&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=ff9933&amp;fullscreen=1&amp;autoplay=1&amp;loop=0" type="application/x-shockwave-flash" allowfullscreen="true" background="#000000" allowscriptaccess="always" width="958" height="380" wmode="transparent"></embed>';
	
	var videocode = '<iframe src="http://player.vimeo.com/video/' + videoURL +'?title=0&amp;byline=0&amp;portrait=0" width="958" height="380" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>';
	
	$("#slider").hide();
	
	$("#videocontent").html(videocode);	
	
	$(".videocontentarea").show();
	
	$('#slider').data('nivo:vars').stop = true; //Stop the Slider	
	
}
function closevideo()
{
	$("#slider").show();
	
	$(".videocontentarea").hide();
	
	$('#slider').data('nivo:vars').stop = false; //Start the Slider
}

function changevideo(videoURL, value)
{

	$(value).parent().children().removeClass("selectedvideomenuitem");
	
	$(value).addClass("selectedvideomenuitem");
	
	//var videocode = '<embed src="http://vimeo.com/moogaloop.swf?clip_id='+ videoURL +'&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=ff9933&amp;fullscreen=1&amp;autoplay=0&amp;loop=0" type="application/x-shockwave-flash" allowfullscreen="true" background="#000000" allowscriptaccess="always" width="449" height="320" wmode="transparent"></embed>';
	var videocode = '<iframe src="http://player.vimeo.com/video/' + videoURL +'?title=0&amp;byline=0&amp;portrait=0" width="449" height="320" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>';
	
	$(value).parent().parent().next().html(videocode);
	
	$("#videotype").html($(value).html());
	
	
	
}





















