﻿$.extend({
    includePath: '',
    include: function(file) {
        var files = typeof file == "string" ? [file] : file;
        for (var i = 0; i < files.length; i++) {
            var name = files[i].replace(/^\s|\s$/g, "");
            var att = name.split('.');
            var ext = att[att.length - 1].toLowerCase();
            var isCSS = ext == "css";
            var tag = isCSS ? "link" : "script";
            var attr = isCSS ? " type='text/css' rel='stylesheet' " : " language='javascript' type='text/javascript' ";
            var link = (isCSS ? "href" : "src") + "='" + $.includePath + name + "'";
            if ($(tag + "[" + link + "]").length == 0) document.write("<" + tag + attr + link + "></" + tag + ">");
        }
    }
});

$.fn.extend({
    hoverClass: function(c) {
        return this.each(function() {
            $(this).hover(function() { $(this).addClass(c); },function() { $(this).removeClass(c); });
        });
    }
})

function flash(file,w,h) {
    document.write('<table border="0" padding="0" cellspacing="0"><tr><td><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+w+'" height="'+h+'"> ');
    document.write('<param name="movie" value="' + file + '">');
    document.write('<param name="quality" value="high"> ');
    document.write('<param name="wmode" value="transparent"> ');
    document.write('<param name="menu" value="false"> ');
    document.write('<embed src="' + file + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+w+'" height="'+h+'" wmode="transparent"></embed> ');
    document.write('</object><td></tr></table>');
}


function fullOpen(obj) {
    window.open($(obj).attr("href"), 'detail', 'width=' + window.screen.width + ',height=' + (window.screen.height - 20) + ',toolbar=no,location=no,directories=no,menubar=no,scrollbars=no,resizable=yes,status=no');
    return false;
}

$(function() {


    $("a[href^='/Detail.aspx']").click(function() { fullOpen(this); return false; });


    
    
});