﻿$(function () {
		

		// Sidebar - Sub Menu Slide

		$('ul#sidemenu li').click(function() {

				if($(this).find("ul").length) {

					//alert($(this).find("ul").length);

					$(this).toggleClass("selected");

					$(this).find("ul").slideToggle('fast');

				}

			});

			

			

		

		

		//*********************************************

		//-----FLASH EMBEDDING

		

		//flash banner embed

//$('#banner').flash(
//{
//
//				swf: 'swf/banner.swf',
//
//				height: 90,
//
//				width: 728,
//
//				wmode: 'transparent'
//
//				}
//
//		);

		

		//flash davetiye footer embed

		$('#davetiye').flash(

			{

				swf: 'swf/mini.swf',

				height: 150,

				width: 184,

				wmode: 'transparent'

				}

		);
		
		//flash menu embed

		$('#menu').flash(

			{

				swf: 'swf/menu.swf',

				height: 90,

				width: 983,

				wmode: 'transparent'

				}

		);

		

		//flash destek verenler footer embed

		$('#destek').flash(

			{

				swf: 'swf/destek.swf',

				height: 70,

				width: 983,

				wmode: 'transparent'

				}

		);

		

		//flash davetiye big sidebar embed

		$('#davetiye-big').flash(

			{

				swf: 'swf/ticket.swf',

				height: 400,

				width: 240,

				wmode: 'transparent'

				}

		);

		

		//flash sponsor firmalar embed

		$('#sponsor').flash(

			{

				swf: 'swf/sponsor.swf',

				height: 70,

				width: 983,

				wmode: 'transparent'

				}

		);

		

		//flash news embed

		$('#news').flash(

			{

				swf: 'swf/news.swf',

				height: 510,

				width: 400,

				wmode: 'transparent'

				}

		);

		//*********************************************

		

		

		//input watermark

		$(".watermark").each(function (i) {

				$(this).watermark($(this).attr('title'), {className: "watermark",useNative: false});	

        });

	

	

		//table styling

		$("tr:even").addClass("alt");

		

		

		

		

		//Image Gallery Fancybox

		$("div.galeri-images a").fancybox();

		

		

		$("a.video").fancybox({

			'hideOnContentClick': false

		});


});

$(function () {



var images = ['www.shu.ac.uk/turkey"><img src="banners/transform-yourself.gif"',
'www.aucb.ac.uk"><img src="banners/AUCB_web_banner.gif"'

];


$('<a target="_blank" href="http://'+ images[Math.floor(Math.random() * images.length)] +' /></a>').appendTo('#banner');

});
