$(document).ready(function(){
	
	
	//Strip tablosu icin renklendirme
	$(".strip tr:even").addClass("eventr");
	$(".strip tr:odd").addClass("oddtr");
	$(".strip tr").mouseover(function() 
	{
		$(this).addClass("trover");
	}).mouseout(function() 
	{
		$(this).removeClass("trover");
	}).click(function() {
		$(this).toggleClass("trclick");
	});
	/*End */
	
	/*ddsmoothmenu.init({
		mainmenuid: "smoothmenu1", //menu DIV id
		orientation: 'h', //Horizontal or vertical menu: Set to "h" or "v"
		classname: 'ddsmoothmenu', //class added to menu's outer DIV
		//customtheme: ["#1c5a80", "#18374a"],
		contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
	})
	*/
	
	Shadowbox.init({
		players: ["iframe","img","html","flv"],
		handleOversize: "drag",
		counterType: "skip"
	});
	
	
	
});

function isValidEmailAddress(emailAddress) 
{
var pattern = new RegExp(/^(("[\w-\s]+")|([\w-]+(?:\.[\w-]+)*)|("[\w-\s]+")([\w-]+(?:\.[\w-]+)*))(@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$)|(@\[?((25[0-5]\.|2[0-4][0-9]\.|1[0-9]{2}\.|[0-9]{1,2}\.))((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){2}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\]?$)/i);
return pattern.test(emailAddress);
}

function isTckimlik(tcno)
{
   var toplam;
   toplam = Number(tcno.substring(0,1)) + Number(tcno.substring(1,2)) + Number(tcno.substring(2,3)) + Number(tcno.substring(3,4)) + Number(tcno.substring(4,5)) + Number(tcno.substring(5,6)) + Number(tcno.substring(6,7)) + Number(tcno.substring(7,8)) + Number(tcno.substring(8,9)) + Number(tcno.substring(9,10));
   
	strtoplam = String(toplam);
	
	onunbirlerbas = strtoplam.substring(strtoplam.length, strtoplam.length-1);

	if(onunbirlerbas == tcno.substring(10,11))
	{
		return true;
	}
	else{
		
		return false;
	}
}


function open_product(content_id,title)
{
	Shadowbox.open({
        content:    'product_detail.php?content_id='+content_id,
        player:     "iframe",
        title:      title,
        height:     650,
        width:      750
    });
}

function open_image(image_url) {
    Shadowbox.open({
        content: image_url,
        player: "img",
        title: title
    });
}




