﻿function getSWF(swWidth, swHeight, swFile, swWmode) {
    var str = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width=' + swWidth + ' height=' + swHeight + ' VIEWASTEXT>';
    str += '<param name="movie" value="' + swFile + '" />';
    str += '<param name="quality" value="high" />';
    // wmode = window, transparent, opaque
    str += '<param name="wmode" value="' + swWmode + '" />';
    str += '<param name="menu" value="false" />';
    str += '<embed src="' + swFile + '" width=' + swWidth + ' height=' + swHeight + ' menu="false" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent"></embed></object>';
    document.write(str);
}


function makeURL(nod) {
    var title = encodeURI(document.title);
    var url = escape(document.URL);
    title = title.replace("-", "");

    var options = "height=700,width=800,titlebar=no,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=1";
    var mURL = '';

    if (nod == 1) {
        mURL = "http://www.facebook.com/sharer.php?u=" + url + "&;t=" + title;
        //secondTracker._trackEvent('ShareLinks', 'Facebook');
    }

    if (nod == 2) {
        mURL = "http://friendfeed.com/share/bookmarklet/frame#title=" + title + "&amp;url=" + url;
        //secondTracker._trackEvent('ShareLinks', 'FriendFeed');
    }
    if (nod == 3) {
        mURL = "http://www.google.com/bookmarks/mark?op=edit&#38;bkmk=" + url + "&#38;title=" + title;
        //secondTracker._trackEvent('ShareLinks', 'GoogleBookmarks');
    }
    if (nod == 4) {
        mURL = "http://www.myspace.com/Modules/PostTo/Pages/?l=2&amp;u=" + url + "&amp;t=" + title + "&amp;c=" + title
        //secondTracker._trackEvent('ShareLinks', 'Myspace');
    };
    if (nod == 5) {
        mURL = "http://del.icio.us/post?url=" + url + "&amp;title=" + title
        //secondTracker._trackEvent('ShareLinks', 'Delicious');
    };
    if (nod == 6) {
        mURL = "http://www.linkedin.com/shareArticle?mini=true&amp;url=" + url + "&amp;summary=" + title
        //secondTracker._trackEvent('ShareLinks', 'Linkedin');
    };
    if (nod == 7) {
        mURL = "http://twitter.com/home?status=" + title + " - " + url
        //secondTracker._trackEvent('ShareLinks', 'Twitter');
    };
    if (nod == 8) {
        mURL = "http://digg.com/submit?url=" + url + "&amp;title=" + title
        //secondTracker._trackEvent('ShareLinks', 'Digg');
    };

    window.open(mURL.replace(/amp;/gi, ''), '_blank', options);
}

$(document).ready(function () {
    $('.cufon').each(function () {
        Cufon.replace(this, { fontFamily: $(this).css('font-family'), fontSize: $(this).css('font-size'), letterSpacing: $(this).css('letter-spacing'), color: $(this).css('color') });
    });
});


function multiCount(text, long) {
    var maxlength = new Number(long); if (text.value.length > maxlength) {
        text.value = text.value.substring(0, maxlength);
        alert(" Sadece " + long + " karakter yazabilirsiniz.");
    }
}
